我对 Latex 还不太熟悉,正在使用 overleaf。如所附屏幕截图所示,与右列表格相比,左列图形从稍微靠下的位置开始。这对我来说看起来有点奇怪。我尝试使用 [t]、[h]、[ht]、[!ht]、[htbp!] 等进行定位,但结果完全相同。有什么建议可以微调这个差距吗?
\begin{figure} [!ht]%[htbp!]
\centering
\begin{subfigure}[b]{0.485\textwidth}
\includegraphics[width=1\linewidth]{grid_events2.pdf}
\caption{Scenario 2 - Reporting Rate of vPMUs}
\label{grid_events}
\end{subfigure}
\begin{subfigure}[b]{0.485\textwidth}
\includegraphics[width=1\linewidth]{vmag.pdf}
\caption{Scenario 2 - Data Rate of vPMUs}
\label{busVmag}
\end{subfigure}
\begin{subfigure}[b]{0.485\textwidth}
\includegraphics[width=1\linewidth]{vang.pdf}
\caption{Scenario 2 - Data Rate of vPMUs}
\label{busVang}
\end{subfigure}
\begin{subfigure}[b]{0.485\textwidth}
\includegraphics[width=1\linewidth]{roc.pdf}
\caption{Scenario 2 - Data Rate of vPMUs}
\label{ROC_phi}
\end{subfigure}
\caption[]{Simulated Grid Events and Associated Electrical Parameters}
\end{figure}
答案1
渴望评论:
由于您没有提供 MWE(最小工作示例,一个小但完整的文档)来重现您的问题,我们无法确定问题的来源。使用您在 MWE 中使用article
文档类的代码才不是重现您的问题:
\documentclass[12pt]{article}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\usepackage[demo]{graphicx}
\usepackage{subcaption}
\begin{document}
\begin{figure}[!ht]%[htbp!]
\centering
\begin{subfigure}[b]{0.485\textwidth}
\includegraphics[width=1\linewidth]{grid_events2.pdf}
\caption{Scenario 2 - Reporting Rate of vPMUs}
\label{grid_events}
\end{subfigure}
\begin{subfigure}[b]{0.485\textwidth}
\includegraphics[width=1\linewidth]{vmag.pdf}
\caption{Scenario 2 - Data Rate of vPMUs}
\label{busVmag}
\end{subfigure}
\begin{subfigure}[b]{0.485\textwidth}
\includegraphics[width=1\linewidth]{vang.pdf}
\caption{Scenario 2 - Data Rate of vPMUs}
\label{busVang}
\end{subfigure}
\begin{subfigure}[b]{0.485\textwidth}
\includegraphics[width=1\linewidth]{roc.pdf}
\caption{Scenario 2 - Data Rate of vPMUs}
\label{ROC_phi}
\end{subfigure}
\caption[]{Simulated Grid Events and Associated Electrical Parameters}
\end{figure}
\end{document}
以上 MWE 产生:
(红线表示页面布局)
如您所见,您的问题无法重现。
答案2
我一直在等待更好的答案,但最终我还是使用 进行了手动操作vspace
。
以下是代码片段。
\begin{figure} [!ht]%[htbp!]
\vspace{-15pt}
\centering
\begin{subfigure}[b]{0.485\textwidth}
\includegraphics[width=1\linewidth]{grid_events2.pdf}
\caption{Scenario 2 - Reporting Rate of vPMUs}
\label{grid_events}
\end{subfigure}
\begin{subfigure}[b]{0.485\textwidth}
\includegraphics[width=1\linewidth]{vmag.pdf}
\caption{Scenario 2 - Data Rate of vPMUs}
\label{busVmag}
\end{subfigure}
\begin{subfigure}[b]{0.485\textwidth}
\includegraphics[width=1\linewidth]{vang.pdf}
\caption{Scenario 2 - Data Rate of vPMUs}
\label{busVang}
\end{subfigure}
\begin{subfigure}[b]{0.485\textwidth}
\includegraphics[width=1\linewidth]{roc.pdf}
\caption{Scenario 2 - Data Rate of vPMUs}
\label{ROC_phi}
\end{subfigure}
\caption[]{Simulated Grid Events and Associated Electrical Parameters}
\vspace{-7pt}
\end{figure}