如何修复子图与子标题不对齐的问题

如何修复子图与子标题不对齐的问题

我有两个子图,其中右侧子图垂直位于左侧子图上方。我不确定如何修复此问题。这是我的代码:


\documentclass[12pt]{article}
\usepackage[margin=1in]{geometry}% Change the margins here if you wish.
\setlength{\parindent}{0pt} % This is the set the indent length for new paragraphs, change if you want.
\setlength{\parskip}{5pt} % This sets the distance between paragraphs, which will be used anytime you have a blank line in your LaTeX code.
%------------------------------------

% These packages allow the most of the common "mathly things"
\usepackage{amsmath,amsthm,amssymb}
\usepackage{mathtools}
%website
\usepackage{hyperref}
% This package allows you to add images.
\usepackage{graphicx}
\usepackage{float}
%this is for proper format of quotation.
\usepackage{dirtytalk}
%algorithm
\usepackage{algorithm}
\usepackage{algorithmic}
% Package for line-spacing (HQ)
\usepackage{setspace}
\singlespacing
% \onehalfspacing
% \doublespacing
\setstretch{1.1}

%%%% from langevin monte carlo paper %%%%%
\usepackage[utf8]{inputenc} % allow utf-8 input
\usepackage[T1]{fontenc}    % use 8-bit T1 fonts

\usepackage{url}            % simple URL typesetting
\usepackage{booktabs}       % professional-quality tables
\usepackage{amsfonts}       % blackboard math symbols
\usepackage{nicefrac}       % compact symbols for 1/2, etc.
\usepackage{microtype}      % microtypography
\usepackage{xcolor}         % colors
% Added Extra from this point
\usepackage{wrapfig} %for wrapping text around figure
\usepackage{subcaption} %https://tex.stackexchange.com/questions/645648/environment-subfigure-undefined
\usepackage{amsmath}
\usepackage{amssymb}

\usepackage{nicefrac}
\usepackage{bbm} %for indicator function
\usepackage{mathtools}
\usepackage{algorithm}
\usepackage{algorithmic}
% \usepackage[noend]{algpseudocode}


%Format citing
% \bibliographystyle{unsrt}
\usepackage[comma,authoryear,round]{natbib}
\bibliographystyle{plainnat}


% For the table
% \usepackage{xcolor}
\newcommand\ytl[2]{
\parbox[b]{12em}{\hfill{\color{cyan}\sffamily #1}~$\cdots$~}\makebox[0pt][c]{$\bullet$}\vrule\quad \parbox[c]{10cm}{\vspace{7pt}\raggedright\sffamily #2.\\[7pt]}\\[-3pt]}

\begin{document}

\begin{figure}[htbp]
  \begin{subfigure}[t]{0.50\textwidth}
    \includegraphics[width=\linewidth]{figures/lsvi-phe-DeepSea10.pdf}
    \caption{Comparison in DeepSea environment}\label{fig:deepsea_best_run_8}
  \end{subfigure}
  \hspace*{\fill}   % maximize separation between the subfigures
  \begin{subfigure}[t]{0.50\textwidth}
    \includegraphics[width=\linewidth]{figures/lsvi-phe-deepsea-Msensitivity.pdf}
    \caption{Comparison of LSVI-PHE for different $M$ values in DeepSea.}\label{fig:deepsea_sweep_M_sig0.0005}
  \end{subfigure}
\caption{(a) The results are averaged over 5 independent runs and error bars are reported for the return per episode plots. For this plot, $\beta = 5 \times 10^{-3}$ for LSVI-UCB and $\sigma^2 = 5 \times 10^{-5}$ for LSVI-PHE. (b) The results are averaged over 5 runs and error bars are reported for the return per episode plots. For this plot we fix $\sigma^2 = 5 \times 10^{-4}$. } \label{fig:comp-deepsea}
\end{figure}

\end{document}

它看起来是这样的:

在此处输入图片描述

我怎样才能使它们对齐?

相关内容