\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折线图两个折线图在同一行展示
原创
©著作权归作者所有:来自51CTO博客作者东方飞羽it的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:Latex 画图x, y轴格式
下一篇:在Eclipse中使用EGit
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
两张图
淘宝最新的开发模式,追求前后端分离,使用Node.js全栈解决方案
node.js 开发模式 测试环境