以下是我目前的 LaTeX 代码:
\documentclass{article}
\usepackage{pgfplots}
\usepackage{subcaption}
\captionsetup{compatibility=false}
\begin{document}
\begin{figure}
\begin{subfigure}[b]{0.5\textwidth}
\centering
\resizebox{\linewidth}{!}{
\begin{tikzpicture}
\begin{axis}[
title={Color},
xlabel={Number of annotations per task},
ylabel={Error rate (\%)},
xmin=3, xmax=10,
ymin=0, ymax=11,
xtick={3,4,5,6,7,8,9,10},
ytick={0,2,4,6,8,10,11},
legend pos=north west,
%ymajorgrids=true,
%grid style=dashed,
]
\addplot[
color=blue,
mark=square,
]
coordinates {
(3,08.86)(4,06.88)(5,05.10)(6,02.81)(7,02.38)(8,01.73)(9,00.65)(10,00.65)
};
\legend{Majority Voting}
\end{axis}
\end{tikzpicture}
}
\end{subfigure}
\begin{subfigure}[b]{0.5\textwidth}
\centering
\resizebox{\linewidth}{!}{
\begin{tikzpicture}
\begin{axis}[
title={Color},
xlabel={Number of annotations per task},
ylabel={Error rate (\%)},
xmin=3, xmax=10,
ymin=0, ymax=11,
xtick={3,4,5,6,7,8,9,10},
ytick={0,2,4,6,8,10,11},
legend pos=north west,
%ymajorgrids=true,
%grid style=dashed,
]
\addplot[
color=blue,
mark=square,
]
coordinates {
(3,08.86)(4,06.88)(5,05.10)(6,02.81)(7,02.38)(8,01.73)(9,00.65)(10,00.65)
};
\legend{Majority Voting}
\end{axis}
\end{tikzpicture}
}
\end{subfigure}
\end{figure}
\end{document}
显示如下: