TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two plots drawn with the \pgfplots package. In one of them, I specified that ymin=0 when I created the axis since the plotted curve never goes below y=0 (otherwise something like ymin=-0.2 would be used). However, when I put both of the plots into two \subcaptionboxes that I put in the same figure environment, it becomes apparent that this plot has become raised up, since the frame is much higher up for that plot than the frame for the other plot:

enter image description here

How can I prevent \pgfplots from raising up the plot when I specify (hence increasing?) the value of ymin? I want the frames of both plots to be aligned vertically.

share|improve this question

closed as too localized by Jake, Werner, Thorsten, Kurt, Torbjørn T. Dec 22 '12 at 20:59

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Add the code, to help us trying. Anyway, may be you should look at groupplots in the documentation (in case you are not using it). – Manuel Dec 22 '12 at 15:33
@Manuel: I figured out the reason for this behavior myself, and it wasn't the ymin=0 specification that I said it was. See my answer below. – StrawberryFieldsForever Dec 22 '12 at 15:43
@Manuel: I updated the answer; I realized my initial explanation was incorrect. – StrawberryFieldsForever Jan 26 '13 at 14:46
up vote 1 down vote accepted

I realized that it wasn't the ymin=0 specification that messed up the vertical alignment. This behavior was instead triggered depending on of which sizes the \subcaptionboxex were. It turned out that if they are too large, this misalignment is likely to happen, although I don't really know why.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.