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

Is there a simple way to switch the x- and y-axes, so that the x-axis becomes the vertical axis?

\addplot+[domain=0:10]{1.2*0.000001*(0.2*(x*1000)^2 + 700*x*1000 + 25000)*2};
share|improve this question
up vote 11 down vote accepted

Instead of plotting \addplot {<math expression>}, you can use \addplot ({<x math expression>},{<y math expression>}), so in your case

\addplot+[domain=0:10] ({1.2*0.000001*(0.2*(x*1000)^2 + 700*x*1000 + 25000)*2},{x});


\addplot+[domain=0:10](1.2*0.000001*(0.2*(x*1000)^2 + 700*x*1000 + 25000)*2,x);
share|improve this answer
Fantastic! For a long time I have been searching for this answer. Thank you very much. – jon86 Mar 8 '13 at 12:28

Your Answer


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

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