我在一列中放置了 3 个子图,我想让它们的标题位于它们正下方。使用我当前的设置,我可以像下面这样让它们居中。
我的代码如下,我的所有尝试似乎都没有成功。
\documentclass[journal]{IEEEtran}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{multicol}
\usepackage{caption}
\usepackage{float}
\usepackage{multirow}
\begin{document}
\begin{figure*}[h]
\begin{subfigure}[b]{1\textwidth}
\includegraphics[width=0.3\linewidth]{Resources/"image1".png}
\caption{caption1}
\end{subfigure}
\begin{subfigure}[b]{1\textwidth}
\includegraphics[width=0.3\linewidth]{Resources/"image2".png}
\caption{caption2}
\end{subfigure}
\begin{subfigure}[b]{1\textwidth}
\includegraphics[width=0.3\linewidth]{Resources/"image2".png}
\caption{caption3}
\end{subfigure}
\caption{My Caption}
\label{fig:myLabel}
\end{figure*}
\end{document}
答案1
根据对所需布局的一些假设,以下是三种可能的布局:
\documentclass[journal]{IEEEtran}
\usepackage[demo]{graphicx}
\usepackage{subcaption}
\usepackage{multicol}
\usepackage{caption}
\usepackage{float}
\usepackage{multirow}
\usepackage{lipsum}
\begin{document}
\begin{figure}[h]
\begin{subfigure}[b]{\linewidth}
\centering
\includegraphics[width=0.6\linewidth]{Resources/"image1".png}
\caption{caption1}
\end{subfigure}
\begin{subfigure}[b]{\linewidth}
\centering
\includegraphics[width=0.6\linewidth]{Resources/"image2".png}
\caption{caption2}
\end{subfigure}
\begin{subfigure}[b]{\linewidth}
\centering
\includegraphics[width=0.6\linewidth]{Resources/"image2".png}
\caption{caption3}
\end{subfigure}
\caption{My Caption}
\label{fig:myLabel}
\end{figure}
\lipsum[1-4]
\begin{figure*}
\begin{subfigure}[b]{0.3\linewidth}
\centering
\includegraphics[width=\linewidth]{Resources/"image1".png}
\caption{caption1}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\linewidth}
\centering
\includegraphics[width=\linewidth]{Resources/"image2".png}
\caption{caption2}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\linewidth}
\centering
\includegraphics[width=\linewidth]{Resources/"image2".png}
\caption{caption3}
\end{subfigure}
\caption{My Caption}
\label{fig:myLabel}
\end{figure*}
\lipsum \lipsum[1-3]
\begin{figure}[h]
\captionsetup[subfigure]{justification=justified,singlelinecheck=false}
\begin{subfigure}[b]{\linewidth}
\includegraphics[width=0.6\linewidth]{Resources/"image1".png}
\caption{caption1}
\end{subfigure}
\begin{subfigure}[b]{\linewidth}
\includegraphics[width=0.6\linewidth]{Resources/"image2".png}
\caption{caption2}
\end{subfigure}
\begin{subfigure}[b]{\linewidth}
\includegraphics[width=0.6\linewidth]{Resources/"image2".png}
\caption{caption3}
\end{subfigure}
\caption{My Caption}
\label{fig:myLabel}
\end{figure}
\lipsum
\end{document}