0
点赞
收藏
分享

微信扫一扫

LaTex折线图两个折线图在同一行展示

一ke大白菜 2022-07-27 阅读 54


\begin{figure}[H]
%图片1
\begin{tikzpicture}[scale=0.8]%用scale调整图片大小
\begin{axis}[
xlabel=x in $m^2$,
ylabel=y in $m^2$,
tick align=outside,
y tick label style={/pgf/number format/.cd,%
set thousands separator={}},
width=3in,
height=3in,
legend style={at={(0.5,-0.2)},anchor=north}
]
\addplot[smooth,mark=*,black] plot coordinates {
(1999,1000)
(2000,2000)
(2001,3000)
(2002,4000)
(2003,5000)
(2004,6000)
};
\addlegendentry{line}
\label{figure 1}
\end{axis}
\end{tikzpicture}
\qquad%两图片间填充空间
%图片2
\begin{tikzpicture}[scale=0.8]
\begin{axis}[
xlabel=x in $m^2$,
ylabel=y in $m^2$,
tick align=outside,
y tick label style={/pgf/number format/.cd,%
set thousands separator={}},
width=3in,
height=3in,
legend style={at={(0.5,-0.2)},anchor=north}
]
\addplot[smooth,mark=*,black] plot coordinates {
(1999,1000)
(2000,2000)
(2001,3000)
(2002,4000)
(2003,5000)
(2004,6000)
};
\addlegendentry{line}
\label{figure 2}
\end{axis}
\end{tikzpicture}\caption{two figures.\label{fig:two}}
\end{figure}

LaTex折线图两个折线图在同一行展示_ide

举报

相关推荐

0 条评论