So beheben Sie falsch ausgerichtete Unterabbildungen mit Unterbeschriftungen

So beheben Sie falsch ausgerichtete Unterabbildungen mit Unterbeschriftungen

Ich habe zwei Unterfiguren, bei denen die rechte vertikal über der linken steht. Ich bin nicht sicher, wie ich das beheben kann. Hier ist der Code, den ich habe:


\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}

Und so sieht es aus:

Bildbeschreibung hier eingeben

Wie kann ich sie ausrichten?

verwandte Informationen