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?
Answer
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}}}]]
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}] ]
Comments
Post a Comment