如何控制 TikZ 图形中的刻度标签大小?

如何控制 TikZ 图形中的刻度标签大小?

在使用时,是否有任何方法可以控制 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}

在此处输入图片描述

相关内容