我有以下图片:
我想在标记下方添加文字。我还没有找到任何解决方案。
这是我生成情节的方式:
\begin{tikzpicture}
\begin{axis}[
title={Scale vs. Performance},
xlabel={Number of MLP Blocks},
ylabel={Top-1 Accuracy (\%)},
xmin=0, xmax=10,
ymin=0, ymax=100,
xtick={0, 2, 4, 6, 8, 10},
ytick={0, 20, 40, 60, 80, 100},
xmajorgrids=true,
ymajorgrids=true,
grid style=dashed,
]
\addplot[
color=red,
mark=square,
]
coordinates {
(2,64.89)(4,68.38)(6,69.0)(8,68.68)(10,72)
};
\end{axis}
\end{tikzpicture}
答案1
你的意思是这样的:
A1
我在你的地块上用\node[below] at (axis cs:2,64.89) {A1};
\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
title={Scale vs. Performance},
xlabel={Number of MLP Blocks},
ylabel={Top-1 Accuracy (\%)},
xmin=0, xmax=10,
ymin=0, ymax=100,
xtick={0, 2, 4, 6, 8, 10},
ytick={0, 20, 40, 60, 80, 100},
xmajorgrids=true,
ymajorgrids=true,
grid style=dashed,
]
\addplot[
color=red,
mark=square,
]
coordinates {
(2,64.89)(4,68.38)(6,69.0)(8,68.68)(10,72)
};
\node[below] at (axis cs:2,64.89) {A1};
\end{axis}
\end{tikzpicture}
\end{document}