Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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: bit.ly/MKkJQp –  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
add comment

2 Answers 2

up vote 9 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
add comment

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
add comment

Your Answer

 
discard

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.