Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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

I have some data representing a nested list, each element being composed of 3 real numbers like {{652.112, 0, 0.111838}, {664.096, 29.134, 0.0000485323}, {713.531, 12.1382, 0.805022} ...}. I would like to make an illustration for a journal article out of this list. The first idea is to use ListPlot3D function. The points in my list span in space from 600 to 1300 along $x$ (e.g. about 700 units along $x$) and from -100 to 100 along $y$ (e.g. about 200 units along $y$).

It is principally important for me that the illustration gives a correct feeling about the $x/y$ ratio. However, when I build it the image looks about equal along $x$ and along $y$. Changing AspectRatio->0.2 to 0.5 only helps partially, but disturbs another aspects of the image.

Is there a way to control the $x\text{–}y$ aspect ratio of a 3D image?

share|improve this question
Did you try BoxRatios? "BoxRatios->Automatic normally gives box ratios corresponding to the actual coordinate values in the 3D graphic." ~ Documentation Link: – Vitaliy Kaurov Aug 7 '12 at 9:22
Thank you. I did not yet. This solves my question. Best, Alexei – Alexei Boulbitch Aug 7 '12 at 9:41
up vote 10 down vote accepted

You need BoxRatios, it works also in ListPlot3D.

GraphicsRow[ Table[ Graphics3D[ Sphere[], BoxRatios -> a],
                    {a, {{1, 1, 1}, {2, 1, 1}, {1, 2, 1}, {1, 1, 2}}}]]

enter image description here

You can use it in ListPlot3D, e.g.

GraphicsRow[ Table[ ListPlot3D[Table[Sin[x y], {x, 0, 3, 0.1}, {y, 0, 3, 0.1}], 
                                                       BoxRatios -> {1, 1, 1/k}],                 
                   {k, 3}] ]

enter image description here

share|improve this answer

Maybe something like this:

data = Transpose[{RandomReal[{600, 1300}, 100], 
    RandomReal[{-100, 100}, 100], RandomReal[{0, 1}, 100]}];

ListPlot3D[data, BoxRatios -> {700, 200, 100}]

enter image description here

Even better if you use:

ListPlot3D[data, BoxRatios -> {Automatic, Automatic, 100}]

In this way you control just the height of the box to find your ideal figure.

share|improve this answer

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.