[Tex/LaTex] Make two figures aligned at top

graphicsscalingvertical alignment

I am inserting two graphs (of different size) in the following way:

\begin{figure}[H]
\begin{center}
\includegraphics[scale=0.5]{graph1.eps}
\includegraphics[scale=0.3]{graph2.eps}
\caption{\label{fig:scaled_diss}}
\end{center}
\end{figure}

which would be perfect if the graphs were of near-identical build, but it's currently resulting in the graph borders being mis-aligned, as in:

enter image description here

So the right graph doesn't have tics on the x axis. How do I make it that the graphs are aligned at the top, then the scaling can be altered, to give something like this:

enter image description here

Best Answer

Use the adjustbox package's valign=t key to align the graphics contents at the top:

enter image description here

\documentclass{article}
\usepackage[export]{adjustbox}% http://ctan.org/pkg/adjustbox
\begin{document}
\begin{figure}
  \centering
  \includegraphics[scale=0.5,valign=t]{example-image-a}
  \includegraphics[scale=0.3,valign=t]{example-image-b}
  \caption{A caption\label{fig:scaled_diss}}
\end{figure}
\end{document}

Using the export key with adjustbox, this will load the graphicx package, and allow you to use its keys as part of \includegraphics.

Also, for your specific example, it may be more advisable to use a fixed height, rather than a scale. This way you can more readily provide the same vertical alignment of your items (graphics or otherwise).