![如何控制 TikZ 图形中的刻度标签大小?](https://linux22.com/image/319962/%E5%A6%82%E4%BD%95%E6%8E%A7%E5%88%B6%20TikZ%20%E5%9B%BE%E5%BD%A2%E4%B8%AD%E7%9A%84%E5%88%BB%E5%BA%A6%E6%A0%87%E7%AD%BE%E5%A4%A7%E5%B0%8F%EF%BC%9F.png)
在使用时,是否有任何方法可以控制 LaTeX 中刻度标签的大小pgfplots
? yticks 的写法似乎不正确
LaTeX 代码片段:
\begin{tikzpicture}
\begin{axis}[%
width=\figurewidth,
height=\figureheight,
unbounded coords=jump,
scale only axis,
xmin=0.6,
xmax=11.4,
xtick={1,3,5,7,9,11},
xticklabels={1e-1,1e0,1e1,1e2,1e3,1e4},
x tick label style={rotate=45, anchor=east, align=center},
xlabel={$\lambda$1},
xmajorgrids,
y dir=reverse,
ymin=0,
ymax=12,
ytick={0.1,2.5,5,7.5,10,12},
yticklabels={1e-1,1,1e1,1e2,1e3,1e4},
ylabel={$\lambda$2},
ymajorgrids,
zmin=0,
zmax=2,
zlabel={rmse endmember},
zmajorgrids,
name=plot6,
title={MVC},
axis x line*=bottom,
axis y line*=left,
axis z line*=left
]
\addplot3[%
surf,
shader=faceted,
draw=black,
......]
\end{axis}
\end{tikzpicture}%
答案1
您可以使用ticklabel style={font=\tiny},
。您可以在此处使用任何字体大小。ytick 标签对我来说显示正确,所以我无能为力。也许您必须提供 Torbjorn 建议的完整代码。
\documentclass{Article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[%
%width=\figurewidth,
%height=\figureheight,
unbounded coords=jump,
scale only axis,
xmin=0.6,
xmax=11.4,
xtick={1,3,5,7,9,11},
xticklabels={1e-1,1e0,1e1,1e2,1e3,1e4},
x tick label style={rotate=45, anchor=east, align=center},
xlabel={$\lambda$1},
xmajorgrids,
y dir=reverse,
ymin=0,
ymax=12,
ytick={0.1,2.5,5,7.5,10,12},
yticklabels={1e-1,1,1e1,1e2,1e3,1e4},
ylabel={$\lambda$2},
ymajorgrids,
zmin=0,
zmax=2,
zlabel={rmse endmember},
zmajorgrids,
name=plot6,
title={MVC},
axis x line*=bottom,
axis y line*=left,
axis z line*=left,
ticklabel style={font=\tiny},
]
\addplot3[%
surf,
shader=faceted,
draw=black,samples=50
]
{1/(2*sqrt(pi*y)) * exp(0-x^2/y)};
\end{axis}
\end{tikzpicture}%
\end{document}