I am trying to include 3 eps figures from Matlab in my Tex document. They each have multiple subplots that should all be the same size, but each figure has a different number of subplots. I would like the 3 figures to have the same aspect ratio, but to start at the same height on their respective pages. I can set the figures to have the same aspect ratio, it is the lining up that is the problem. I have tried using the figures with the natural bounding boxes from matlab, and tried setting the bounding box in matlab so that there is empty space on either the top or bottom of the figures with less subplots (so that all figures go into tex the same size). If I use the natural bounding box - tex just centers the figures on their respective pages, so that they all start at different heights on the page - this is quite jarring to look at between pages. If I use the figures with extra space at the top - then the figures get lined up by their captions, but the tops are different heights. If I use the figures with extra space at the bottom - then the figures get lined up by their tops (which I want), but there is lots of space between the graphics and captions...

I feel like there might be something that can be done with using the natural bound box figures and adding space below, but \vspace doesn't seem to take lengths from \setlength and I don't really know how else to do this.

I'm not really sure what else to try - or whether to just go with one of the above options...

I'm not sure how to do a MWE without the figures, but this is what I'm using:

 \newlength\mylena \settoheight\mylena{\includegraphics{fig1.eps}}
 \setlength{\mylend}{1.1\mylenc minus 1.1\mylena}

 \includegraphics[width=\textwidth, %

 \includegraphics[width=\textwidth, %

 \includegraphics[width=\textwidth, %
  • @AboAmmar how did you edit the tex portion to look like that? (So I know how to do it in the future). – BaiSmi Apr 29 '18 at 0:21
  • 1
    See here: mark as a code sample – CarLaTeX Apr 29 '18 at 5:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.