TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

OK, I've plotted these graphs but am unable to stretch the second one, so that they both have the same values on the vertical lines drawn from one to another. I've tried to set domain=0:2200 for both but it doesn't work.alt text

share|improve this question
Howdy i find it quite hard to imagine what your code looks like. Maybe you should consider to produce a (minimal) example. But maybe the mentioning of the xmax and ymax keys helps already . There is also a restrict x domain key. – bloodworks Dec 28 '10 at 21:41
@bloodworks: Sorry, always forget what really matters. xmax, xmin is what I was looking for. – user1996 Dec 28 '10 at 21:54
up vote 6 down vote accepted

You can try setting xmin and xmax (see pgfplots manual, section 4.14 Specifying the plotted range) to the same value for both plots. Naturally there is similarly ymin/ymax and zmin/zmax for the y and z axes, if needed.

share|improve this answer
I've got to say you've done well working out what the question was really about :-) – Joseph Wright Dec 28 '10 at 22:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.