2

I am trying to display two figures, one is pdf and another is eps, side by side in a table. But in the outcome, the left figure (pdf) sits higher than the right one (right). Do you have any idea to move down the left figure a little bit so as to align two figures vertically? Thanks a lot.

This is the latex source

\begin{figure}[tbh]
    \center
    \begin{tabular}{cc}
        \includegraphics[angle=-90,origin=c,width=0.5\columnwidth]{left.pdf}&
        \includegraphics[width=0.5\textwidth]{right.eps}\\
            (a) Existing IMSI & (b) Our IMSI
    \end{tabular}
    \caption{bla bla ...}\label{fig:IMSI}
\end{figure}

This is the problematic output: enter image description here

Please let me know if I need to provide more information to solve this issue. Thank you for your help.

2
  • 1
    Welcome to TeX.SX! Maybe origin=br instead origin=c for the rotated image?
    – esdd
    Jun 2, 2017 at 6:50
  • Yes, you're right, esdd. Please make your comment an answer and I will accept it. Thank you very much! Jun 2, 2017 at 7:04

1 Answer 1

3

Change the origin for the rotation of the left picture to origin=br.

Example:

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}[tbh]
  \centering% <- changed
  \begin{tabular}{@{}cc@{}}
      \includegraphics[angle=-90,origin=Br,width=\dimexpr.5\linewidth-\tabcolsep\relax]
        {example-image}&
      \includegraphics[width=\dimexpr.5\linewidth-\tabcolsep\relax]{example-image}\\
      (a) Existing IMSI & (b) Our IMSI
  \end{tabular}
  \caption{bla bla ...}\label{fig:IMSI}
\end{figure}
\end{document}

Note, that I have used \centering and changed the width of the images a bit to avoid the overfull hbox.

Result:

enter image description here

But maybe its better to load package subcaption and use \subcaptionbox:

\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}
\begin{document}
\begin{figure}[tbh]
  \centering% <- changed
  \subcaptionbox
    {Existing IMSI}
    {\includegraphics[angle=-90,width=\dimexpr.5\linewidth-\tabcolsep\relax]{example-image}}%
  \hfill
  \subcaptionbox
    {Our IMSI}
    {\includegraphics[width=\dimexpr.5\linewidth-\tabcolsep\relax]{example-image}}
  \caption{bla bla ...}\label{fig:IMSI}
\end{figure}
\end{document}

Result:

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .