# Is there an option to plot the Z axis reversed (as shown in the figure)?

Normally the Z axis is plotted from bottom-to-top as shown below :

I got a plot with the axis (axes to be more precise) reversed as shown below:

Is there a way to force the axes to be plotted top-to-bottom?

Thanks!

Mathematica graphics is interactive. Just drag & rotate the plot with mouse till you flip it up side down. You also can do this programmatically:

Plot3D[Sin[x y]^2, {x, -2, 2}, {y, -2, 2}, ViewPoint -> {-1, -2.5, -1},
ViewVertical -> {0, 0, -1}]

Here is how I got these options - if you are curious. Produce Mathematica 3D graphics object and play with it by rotating it around. As soon as you like its orientation excute

Options[%]

And get something like this:

Out[2] = {Axes -> True, BoxRatios -> {1, 1, 0.4},  Method ->
{"RotationControl" -> "Globe"}, PlotRange -> {{-2, 2}, {-2, 2}, {0., 1.}},
ViewPoint -> {-1, -2.5, -1}, ViewVertical -> {0, 0, -1}}

Options ViewPoint and ViewVertical will be most important for your particular case. You can use them now in your code to avoid the need to adjust graphics interactively every time.

NOTE (thanks to @Heike comment below):

In some cases if Options[%] does not work you may try this:

which will produce the set of options I showed above.

• Well, that's a boring solution. :-) Mar 14, 2012 at 20:44
• @BrettChampion I'd be happy to see someone cooking something more entertaining ;-) Mar 14, 2012 at 20:47
• The values for ViewPoint and ViewVertical aren't updated on my system when I evaluate Options[%] after rotating the plot. The only way I can get the updated values is to wrap Options[] directly around the actual plot, rotate the plot, and re-evaluate the whole expression. Mar 14, 2012 at 21:02
• @Heike I'm running M. V8.0.4 on Win7 - works for me. What is your system? Mar 14, 2012 at 21:10
• @VitaliyKaurov I'm using v8.0.4 on OS X. Mar 14, 2012 at 21:11

Using ScalingFunctions

Plot3D[Sin[x y]^2, {x, -2, 2}, {y, -2, 2},
ScalingFunctions -> {Identity, Identity, "Reverse"}]