居中图形太宽?

居中图形太宽?

我如何使这两个太宽的图形居中?

在此处输入图片描述

\documentclass{amsart}
\usepackage{amsthm, amsfonts, amsmath, amssymb, mathrsfs, enumerate,graphicx}
\usepackage{pgfplots}
\usepackage{subcaption}
\usepgfplotslibrary{dateplot}
\usepackage{filecontents}
\usepackage{mathpazo}
\definecolor{skyblue1}{rgb}{0.447,0.624,0.812}
\definecolor{scarletred1}{rgb}{0.937,0.161,0.161}
\pgfplotsset{height=5cm,width=10cm,compat=newest}
\usepgfplotslibrary{dateplot}

\begin{document}

\begin{figure}
\centering
\begin{subfigure}{.2\linewidth}\centering
\begin{tikzpicture}
\begin{axis}[legend style={at={(0.5,-0.35)},anchor=north},
  date coordinates in=x,
  x tick label style={/pgf/number format/1000 sep=},
  xticklabel={\year},
  ylabel=MS-AR(4),
  xlabel=Time,
  enlargelimits=0.10,
  legend columns=2,
]
\addplot[smooth, no markers, color=skyblue1]
  table [x=date, y index=1] {t.dat};

\legend{One-step probabilities}
\end{axis}
\end{tikzpicture}
\end{subfigure}%
\hfill
\begin{subfigure}{.2\linewidth}\centering
\begin{tikzpicture}
\begin{axis}[legend style={at={(0.5,-0.35)},anchor=north},
  date coordinates in=x,
  x tick label style={/pgf/number format/1000 sep=},
  xticklabel={\year},
  ylabel=MS-DR,
  xlabel=Time,
  enlargelimits=0.10,
  legend columns=2,
]
\addplot[smooth, no markers, color=skyblue1]
  table [x=date, y index=1] {msdros.dat};
\legend{One-step probabilities}
\end{axis}
\end{tikzpicture}
\end{subfigure}
\caption{Transition probabilities over time for the MS-AR(4) model (left) and the MS-DR model(right).}
\end{figure}

\end{document}

相关内容