I can't find this in the documentation. How do you force the same scale for all the axes when making a 3D plot? There is the BoxRatios option, but this only changes the dimensions of the visible box with no regard to the actual scales of the axis.

  • 2
    $\begingroup$ Set that option you just found to Automatic and report back. $\endgroup$ – J. M.'s ennui Jul 3 '15 at 8:59
  • $\begingroup$ Shouldn't it be BoxRatios -> 1 ? $\endgroup$ – Feyre Jul 3 '15 at 9:14
  • $\begingroup$ @Feyre, you can answer your own question by trying to plot a function like $x^2+y^2$. Note the shape of the box, and then note the numbers on the ticks. $\endgroup$ – J. M.'s ennui Jul 3 '15 at 9:34
  • $\begingroup$ @Guesswhoitis. yes that worked, thank you. $\endgroup$ – Yrogirg Jul 3 '15 at 10:00
  • $\begingroup$ Then, please answer your own question. :) $\endgroup$ – J. M.'s ennui Jul 3 '15 at 10:00

Only BoxRatios will not solve your problem. You have to fix the PlotRange also. For example take 2(x^2+y^2)

Plot3D[2 (x^2 + y^2), {x, -1, 1}, {y, -1, 1}, BoxRatios -> 1, FaceGrids -> All]

enter image description here

As you can see the unit along z direction is twice compared to x and y (that's why I choose 2 (x^2 + y^2), to make this point)

Now you fix the PlotRange

plrange = {-1, 1};
Plot3D[2 (x^2 + y^2), {x, -1, 1}, {y, -1, 1}, BoxRatios -> 1, 
 FaceGrids -> All, PlotRange -> {plrange, plrange, plrange + 1}]

enter image description here

And your units are same in all directions.

  • 1
    $\begingroup$ Certainly, an inappropriate setting of BoxRatios will not fix OP's problem. Set properly, one will not have to fiddle with PlotRange unless desired. $\endgroup$ – J. M.'s ennui Jul 3 '15 at 10:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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