Sign up ×
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.

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

1 Answer 1

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.