Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have 2 figures identical in size, I even aligned them myself in Illustrator, just to be sure, and when I put them in subfigure side by side, they are not horizontally aligned!

The worst part is, I have 2 other pictures, again the same size, and they are aligned normally. And the code is the same!! I don't know what's the problem!! Is there a way to manually shift one picture up a bit?

Here's the 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}

And here are the pictures (.eps format):

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

The second right picture is lower than the left, and the first pictures are perfectly aligned...

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Looking at the code it is obvious what the difference between the two floats is: the labels! Since you don't have sub-captions, remove the \label commands for them, and the alignment problem disappears.

share|improve this answer
    
Omg I'm such an idiot! i totally didn't notice that there is no label under the second one (and I don't need labels in subfigures anyway)! Feels dumb xD Thanks!!!! :) –  dingo_d Mar 13 '13 at 12:26
1  
Nonono, this happens. But maybe @AxelSommerfeldt might have a look into this, as the \label seems to leak something into the float. –  mafp Mar 13 '13 at 16:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.