子图中的图形未对齐

子图中的图形未对齐

我有 2 个大小相同的图形,我甚至在 Illustrator 中亲自对齐了它们,只是为了确保万无一失,而当我将它们并排放置在子图中时,它们并没有水平对齐!

最糟糕的是,我还有另外两张图片,大小也一样,而且它们对齐正常。代码也一样!!我不知道问题出在哪里!!有没有办法手动将一张图片向上移动一点?

这是MWE:

%&latex
\documentclass[twocolumn,prc,floats,amsmath,amssymb,superscriptaddress,nofootinbib,11pt]{revtex4-1}


\usepackage{caption}
\usepackage{array}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}

\newcolumntype{y}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\renewcommand*{\arraystretch}{1.2}



\begin{document}

\begin{figure*}[!tp]
       \centering
       \begin{subfigure}{0.48\textwidth}
               \centering
               \includegraphics[width=1.1\textwidth]{Cobalt60.eps}
               \label{fig:Co}
       \end{subfigure}\quad
       \begin{subfigure}{0.48\textwidth}
               \centering
               \includegraphics[width=1.1\textwidth]{Cezij137.eps}
               \label{fig:Cs}
       \end{subfigure}
       \caption{Lijevo: Spektar ${}^{60} \textrm{Co}$ s dvije karakteristične zrake na 1173.237 keV i 1332.501 keV. Desno: Spektar ${}^{137} \textrm{Cs}$ s karakterističnom zrakom na 661.657 keV. Na manjoj slici je uvećan Comptonov rub smješten oko 550-og kanala.}
       \label{fig:Spektripoz1}
\end{figure*}

\begin{figure*}[!tp]
       \centering
       \begin{subfigure}{0.48\textwidth}
               \centering
               \includegraphics[width=1.1\textwidth]{Barij133.eps}
               \label{fig:Ba}
       \end{subfigure}\quad
       \begin{subfigure}{0.48\textwidth}
               \centering
               \includegraphics[width=1.1\textwidth]{fit.eps}
       \end{subfigure}
       \caption{Lijevo: Spektar ${}^{133} \textrm{Ba}$. Barijev spektar ima nekoliko karakterističnih vrhova, no uzimamo samo najintenzivniji vrh. Desno: Kalibracijski pravac.}
       \label{fig:Spektripoz2}
\end{figure*}

\end{document}

图片如下(.eps 格式):

http://www76.zippyshare.com/v/19000331/file.html http://www76.zippyshare.com/v/78211264/file.html http://www76.zippyshare.com/v/46193895/file.html http://www76.zippyshare.com/v/25153661/file.html

右边第二张图片比左边低,而第一张图片则完美对齐……

答案1

查看代码可以明显看出两个浮点数之间的区别:标签!由于您没有子标题,因此删除\label它们的命令,对齐问题就会消失。

答案2

对于那些遇到此问题但有子标题的人(比如我):我发现解决方案是使用\begin{subfigure}[t]{<width>}t在传递的参数中使用subfigure显然将图像对齐在顶部而不是底部(b),这意味着图像和标题的顶部是对齐的,并且标题的底部可以流动到任何它们想要的位置而不会影响其余的布局!

来源

相关内容