1

How can I move my second subfigure up so that it matches my left figure? Currently I have:

\begin{figure}[h]
  \includegraphics[width=4in,height=3in,keepaspectratio]{DT}
  \includegraphics[width=4in,height=3in,keepaspectratio]{randomforests}
\end{figure}

I've seen some other solutions using minipage and subfigure, but I want to keep the a and b the way they are.

1 Answer 1

1

It seems like your sub-figure labels are embedded inside the graphics. As such, there's no need for a sub-figure package to manage the labels. Instead, load the adjustbox package with the export option and add vadjust=t to your \includegraphics options:

enter image description here

\documentclass{article}

\usepackage[export]{adjustbox}

\begin{document}

\begin{figure}[h]
  \centering
  \includegraphics
    [width=2in,height=2in,keepaspectratio,valign=t]{example-image-golden-upright}
  \includegraphics
    [width=2in,height=2in,keepaspectratio,valign=t]{example-image}
  \caption{A figure caption}
\end{figure}

\end{document}
1
  • Awesome, cheers!
    – user21398
    Jan 25, 2019 at 1:46

You must log in to answer this question.

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