我需要帮助,如何在三元图中的z 轴上插入X_{Bi}
和。表示下标,而 则与 LaTeX 中的一样,表示z 轴上的 是从左到右增加的。在下面显示的示例中,我想使用放置在 前面或顶部的 来显示在每个图中从 0 增加到 1.0。 rightarrow
subfigures
X_{Bi}
X
Bi
rightarrow
Bi
rightarrow
X_{Bi}
X_{Bi}
\documentclass{article}
\usepackage{pgfplots,subcaption}
\usepgfplotslibrary{ternary}
\pgfplotsset{compat=1.8}
%
\begin{document}
\begin{figure}%
\begin{subfigure}{\columnwidth}\centering
\begin{tikzpicture}
\begin{ternaryaxis}[
ternary limits relative=false,
width=7.5cm,
height=7.5cm,
ymax=1.0,
no markers,
% clip=false,
% disabledatascaling,
minor tick num=1,
grid=both,
xlabel=Sn,
xlabel style={
at={(axis cs:1,0,0)},
anchor=south
},
ylabel=Sb,
ylabel style={
at={(axis cs:0,1,0)},
anchor=10
},
zlabel=Bi,
zlabel style={
at={(axis cs:0,0,1)},
anchor=north west
},
]
\addplot3 [black,dashed] coordinates {
(0.9047, 0.0953, 0.0000)
(0.9019, 0.0883, 0.0098)
(0.8993, 0.0806, 0.0201)
(0.8969, 0.0722, 0.0309)
(0.8950, 0.0630, 0.0420)
(0.8936, 0.0532, 0.0532)
(0.8929, 0.0428, 0.0643)
(0.8930, 0.0321, 0.0749)
(0.8938, 0.0212, 0.0850)
(0.8953, 0.0105, 0.0942)
(0.8975, 0.0000, 0.1025)
};
\addplot3 [black,dashed] coordinates {
(0.8209, 0.1791, 0.0000)
(0.8131, 0.1682, 0.0187)
(0.8054, 0.1557, 0.0389)
(0.7980, 0.1414, 0.0606)
(0.7913, 0.1252, 0.0835)
(0.7859, 0.1071, 0.1071)
(0.7823, 0.0871, 0.1306)
(0.7810, 0.0657, 0.1533)
(0.7822, 0.0436, 0.1742)
(0.7859, 0.0214, 0.1927)
(0.7917, 0.0000, 0.2083)
};
\addplot3 [black,dashed] coordinates {
(0.7439, 0.2561, 0.0000)
(0.7313, 0.2418, 0.0269)
(0.7186, 0.2251, 0.0563)
(0.7060, 0.2058, 0.0882)
(0.6942, 0.1835, 0.1223)
(0.6841, 0.1580, 0.1580)
(0.6767, 0.1293, 0.1940)
(0.6729, 0.0981, 0.2290)
(0.6734, 0.0653, 0.2613)
(0.6777, 0.0322, 0.2901)
(0.6848, 0.0000, 0.3152)
};
\end{ternaryaxis}
\end{tikzpicture}
\caption{First Image}
\label{fig:a:first}
\end{subfigure}
\begin{subfigure}{\columnwidth}\centering
\begin{tikzpicture}
\begin{ternaryaxis}[
ternary limits relative=false,
width=7.5cm,
height=7.5cm,
ymax=1.0,
no markers,
% clip=false,
% disabledatascaling,
minor tick num=1,
grid=both,
xlabel=Sb,
xlabel style={
at={(axis cs:1,0,0)},
anchor=south
},
ylabel=Sn,
ylabel style={
at={(axis cs:0,1,0)},
anchor=10
},
zlabel=Bi,
zlabel style={
at={(axis cs:0,0,1)},
anchor=north west
},
]
\addplot3 [black,dashed] coordinates {
(0.9047, 0.0953, 0.0000)
(0.9019, 0.0883, 0.0098)
(0.8993, 0.0806, 0.0201)
(0.8969, 0.0722, 0.0309)
(0.8950, 0.0630, 0.0420)
(0.8936, 0.0532, 0.0532)
(0.8929, 0.0428, 0.0643)
(0.8930, 0.0321, 0.0749)
(0.8938, 0.0212, 0.0850)
(0.8953, 0.0105, 0.0942)
(0.8975, 0.0000, 0.1025)
};
\addplot3 [black,dashed] coordinates {
(0.8209, 0.1791, 0.0000)
(0.8131, 0.1682, 0.0187)
(0.8054, 0.1557, 0.0389)
(0.7980, 0.1414, 0.0606)
(0.7913, 0.1252, 0.0835)
(0.7859, 0.1071, 0.1071)
(0.7823, 0.0871, 0.1306)
(0.7810, 0.0657, 0.1533)
(0.7822, 0.0436, 0.1742)
(0.7859, 0.0214, 0.1927)
(0.7917, 0.0000, 0.2083)
};
\addplot3 [black,dashed] coordinates {
(0.7439, 0.2561, 0.0000)
(0.7313, 0.2418, 0.0269)
(0.7186, 0.2251, 0.0563)
(0.7060, 0.2058, 0.0882)
(0.6942, 0.1835, 0.1223)
(0.6841, 0.1580, 0.1580)
(0.6767, 0.1293, 0.1940)
(0.6729, 0.0981, 0.2290)
(0.6734, 0.0653, 0.2613)
(0.6777, 0.0322, 0.2901)
(0.6848, 0.0000, 0.3152)
};
\end{ternaryaxis}
\end{tikzpicture}
\caption{Second Image}
\label{fig:a:second}
\end{subfigure}
\caption{Isoactivity curves}%
\end{figure}
\end{document}
答案1
能够通过在代码中的\node at (zticklabel cs:0.5) [anchor=north] {$X_{Bi}$}
行前插入和在代码中(正如 Jake 今天所建议的那样)成功地将 X_{Bi} 沿 z 轴定位后,我观察到通过在该行的最后一项中添加该项目,得到了回答该问题的预期结果。因此,我现在得到以下结果:\end{ternaryaxis}
activate clip=false
$\rightarrow$
\node
\documentclass{article}
\usepackage{pgfplots,subcaption}
\usepgfplotslibrary{ternary}
\pgfplotsset{compat=1.8}
%
\begin{document}
\begin{figure}%
\begin{subfigure}{\columnwidth}\centering
\begin{tikzpicture}
\begin{ternaryaxis}[
ternary limits relative=false,
width=7.5cm,
height=7.5cm,
ymax=1.0,
no markers,
clip=false,
% disabledatascaling,
minor tick num=1,
grid=both,
xlabel=Sn,
xlabel style={
at={(axis cs:1,0,0)},
anchor=south
},
ylabel=Sb,
ylabel style={
at={(axis cs:0,1,0)},
anchor=10
},
zlabel=Bi,
zlabel style={
at={(axis cs:0,0,1)},
anchor=north west
},
]
\addplot3 [black,dashed] coordinates {
(0.9047, 0.0953, 0.0000)
(0.9019, 0.0883, 0.0098)
(0.8993, 0.0806, 0.0201)
(0.8969, 0.0722, 0.0309)
(0.8950, 0.0630, 0.0420)
(0.8936, 0.0532, 0.0532)
(0.8929, 0.0428, 0.0643)
(0.8930, 0.0321, 0.0749)
(0.8938, 0.0212, 0.0850)
(0.8953, 0.0105, 0.0942)
(0.8975, 0.0000, 0.1025)
};
\addplot3 [black,dashed] coordinates {
(0.8209, 0.1791, 0.0000)
(0.8131, 0.1682, 0.0187)
(0.8054, 0.1557, 0.0389)
(0.7980, 0.1414, 0.0606)
(0.7913, 0.1252, 0.0835)
(0.7859, 0.1071, 0.1071)
(0.7823, 0.0871, 0.1306)
(0.7810, 0.0657, 0.1533)
(0.7822, 0.0436, 0.1742)
(0.7859, 0.0214, 0.1927)
(0.7917, 0.0000, 0.2083)
};
\addplot3 [black,dashed] coordinates {
(0.7439, 0.2561, 0.0000)
(0.7313, 0.2418, 0.0269)
(0.7186, 0.2251, 0.0563)
(0.7060, 0.2058, 0.0882)
(0.6942, 0.1835, 0.1223)
(0.6841, 0.1580, 0.1580)
(0.6767, 0.1293, 0.1940)
(0.6729, 0.0981, 0.2290)
(0.6734, 0.0653, 0.2613)
(0.6777, 0.0322, 0.2901)
(0.6848, 0.0000, 0.3152)
};
\node at (zticklabel cs:0.5) [anchor=north] {$X_{Bi}$ $\rightarrow$ };
\end{ternaryaxis}
\end{tikzpicture}
\caption{First Image}
\label{fig:a:first}
\end{subfigure}
\begin{subfigure}{\columnwidth}\centering
\begin{tikzpicture}
\begin{ternaryaxis}[
ternary limits relative=false,
width=7.5cm,
height=7.5cm,
ymax=1.0,
no markers,
clip=false,
% disabledatascaling,
minor tick num=1,
grid=both,
xlabel=Sb,
xlabel style={
at={(axis cs:1,0,0)},
anchor=south
},
ylabel=Sn,
ylabel style={
at={(axis cs:0,1,0)},
anchor=10
},
zlabel=Bi,
zlabel style={
at={(axis cs:0,0,1)},
anchor=north west
},
]
\addplot3 [black,dashed] coordinates {
(0.9047, 0.0953, 0.0000)
(0.9019, 0.0883, 0.0098)
(0.8993, 0.0806, 0.0201)
(0.8969, 0.0722, 0.0309)
(0.8950, 0.0630, 0.0420)
(0.8936, 0.0532, 0.0532)
(0.8929, 0.0428, 0.0643)
(0.8930, 0.0321, 0.0749)
(0.8938, 0.0212, 0.0850)
(0.8953, 0.0105, 0.0942)
(0.8975, 0.0000, 0.1025)
};
\addplot3 [black,dashed] coordinates {
(0.8209, 0.1791, 0.0000)
(0.8131, 0.1682, 0.0187)
(0.8054, 0.1557, 0.0389)
(0.7980, 0.1414, 0.0606)
(0.7913, 0.1252, 0.0835)
(0.7859, 0.1071, 0.1071)
(0.7823, 0.0871, 0.1306)
(0.7810, 0.0657, 0.1533)
(0.7822, 0.0436, 0.1742)
(0.7859, 0.0214, 0.1927)
(0.7917, 0.0000, 0.2083)
};
\addplot3 [black,dashed] coordinates {
(0.7439, 0.2561, 0.0000)
(0.7313, 0.2418, 0.0269)
(0.7186, 0.2251, 0.0563)
(0.7060, 0.2058, 0.0882)
(0.6942, 0.1835, 0.1223)
(0.6841, 0.1580, 0.1580)
(0.6767, 0.1293, 0.1940)
(0.6729, 0.0981, 0.2290)
(0.6734, 0.0653, 0.2613)
(0.6777, 0.0322, 0.2901)
(0.6848, 0.0000, 0.3152)
};
\node at (zticklabel cs:0.5) [anchor=north] {$X_{Bi}$$\rightarrow$};
\end{ternaryaxis}
\end{tikzpicture}
\caption{Second Image}
\label{fig:a:second}
\end{subfigure}
\caption{Isoactivity curves}%
\end{figure}
\end{document}