How to reverse X and Y axis in ContourPlot? I tried to do this many times and always I reversed just one axes, the other one didn't change. The X axis is correct but Y is incorrect. I want the values on the Y axis to be greater than 0. Is it possible? I used ContourPlot because I have functions like $F(x,y)=x^2+y^2$ contour plot

  • 2
    $\begingroup$ Does ContourPlot[x^3 - y^2, {x, -3, 3}, {y, -3, 3}, ScalingFunctions -> {"Reverse", "Reverse"}] not do what you want? $\endgroup$ Commented Apr 24, 2020 at 0:58

1 Answer 1


As J.M. pointed out, ContourPlot[x^2 + y^2, {x, -5, 5}, {y, -50, 0}, ScalingFunctions -> {"Reverse", "Reverse"}] will reverse both axes. If you'd only like one axis reversed, you can replace one of those "Reverse"s with Automatic.

  • $\begingroup$ Thank you!! It was so easy :) A used just one "Reverse" i thats why it didnt work. $\endgroup$
    – Ewa
    Commented Apr 24, 2020 at 5:33
  • $\begingroup$ You can also use more generic Automatic instead of Identity (which is specific to this task), as usual with most such lists as values of options. $\endgroup$
    – kirma
    Commented Apr 24, 2020 at 8:44
  • $\begingroup$ Automatic is better I've changed it to say that $\endgroup$
    – fp.monkey
    Commented Apr 26, 2020 at 6:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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