Make two figures aligned at top

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:

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:

-
don't use scale= use height= so they both scale to the same height. (and don't use H :-) –  David Carlisle Mar 10 '13 at 21:41
@David But using "height=" won't give the desired result -- in the desired result, the two images do not have the same height, because of the x-axis labels in the first image. (And for examples like the way the figures and text are used together seamlessly in the question itself, H is a reasonable way to ensure the result isn't nonsense, if you need to use the figure command at all. :-) –  Matt Jan 18 '14 at 10:55

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

\documentclass{article}
\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).

-

Since adjustbox is not easy to install on ubuntu-12.04 the solution proposed in Aligning image and text on top, with minipages can be useful.

\begin{tabular}{p{0.5\textwidth} p{0.5\textwidth}}
\vspace{0pt} \includegraphics[width=0.49\textwidth]{example-image-a} &
\vspace{0pt} \includegraphics[width=0.49\textwidth]{example-image-b}
\end{tabular}

-

A third alternative is the stackengine package, with its \belowbaseline command, which places the top of an object a given distance below the baseline, shown below without, then with \belowbaseline.

\documentclass{article}
\usepackage{stackengine}
\usepackage{graphicx}
\begin{document}

\def\figa{\rule{1in}{1in}}
\def\figb{\scalebox{.6}{\figa}}

\begin{figure}[H]
\begin{center}
\figa~\figb
\caption{\label{fig:scaled_diss}}
\end{center}
\end{figure}

\begin{figure}[H]
\begin{center}
\belowbaseline[0pt]{\figa}~\belowbaseline[0pt]{\figb}
\caption{\label{fig:scaled_diss}}
\end{center}
\end{figure}

\end{document}


-