\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