I am using the following code to put two figures next to each other (I am not providing a minimal example right away, because maybe the problem is obvious from the code. However, I will, if someone needs one!):
\begin{figure}[h]
\begin{minipage}[h]{0.5\linewidth}
\centering
\includegraphics[width=\linewidth]{pdfexp.png}
\caption{Dichte der Exponential-Verteilung für $a=0.5,\ \frac{1}{3},\ \frac{1}{5},\ \frac{1}{1000}.$}
\end{minipage}
\hspace{0.5cm}
\begin{minipage}[h]{0.5\linewidth}
\centering
\includegraphics[width=\linewidth]{cdfexp.png}
\caption{Verteilungsfunktion der Exponential-Verteilung für $a=0.5,\ \frac{1}{3},\ \frac{1}{5},\ \frac{1}{1000}$.}
\end{minipage}
\end{figure}
This produces:
The images are of the same size, but the axes are not at the same base level. The axes from the right figure are put higher than the ones of the left figure. Why is this happening?
pdfexp.png
andcdfexp.png
) have the same bounding box, then it would be possible align the baselines of the chart. Otherwise you'll have to fiddle with their vertical placement using\raisebox
.[h]
option forminipage
, is there? Try[t]
(top) instead. I think this happens because the one caption is higher. Top alignment to the baseline of the first line (i.e. the images) might fix it.height=4.3cm
or similar rather than width. If necessary you can adjust slightly the second or retake thecapture. (Avoids minipages as well).