Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #4964 > unrolled thread
| Started by | John Fultz <jfultz@wolfram.com> |
|---|---|
| First post | 2011-09-15 08:46 +0000 |
| Last post | 2011-09-15 08:46 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
Re: AspectRatio unpredictable John Fultz <jfultz@wolfram.com> - 2011-09-15 08:46 +0000
| From | John Fultz <jfultz@wolfram.com> |
|---|---|
| Date | 2011-09-15 08:46 +0000 |
| Subject | Re: AspectRatio unpredictable |
| Message-ID | <j4se0b$sm3$1@smc.vnet.net> |
What do you mean that the bounding box is "cube-shaped"? AspectRatio controls
the two-dimensional bounding box, in your case, making it as *square* as
possible. There are also three-dimensional factors coming into play, such as
BoxRatios, which determine how much of that 2D area can actually be usefully
filled with an image.
You might better benefit by sticking to adjusting the 3D parameters...in this
case, I think BoxRatios and SphericalRegion are options you would find useful.
I can only speculate, but perhaps something like this is what you were hoping
for:
DiscretePlot3D[x*y, {x, -2, 2}, {y, -2, 2},
PlotRange -> {{-4, 4}, {-4, 4}, {-4, 4}}, SphericalRegion -> True,
BoxRatios -> {1, 1, 1}, ExtentSize -> 0.75,
AxesLabel -> {"x", "y", "z"}, PlotStyle -> Opacity[0.5],
ColorFunctionScaling -> False,
ColorFunction -> (Hue[0.35 (#3 + 4)/8] &)]
Sincerely,
John Fultz
jfultz@wolfram.com
User Interface Group
Wolfram Research, Inc.
On Wed, 14 Sep 2011 05:12:08 -0400 (EDT), Christopher O. Young wrote:
> When I rotate this plot, the size and shape of the bounding box jumps
> around
> pretty wildly. It goes from cube-shaped, the way it should be, to a
> flattened box.
>
> There are pictures at http://home.comcast.net/~cy56/AspectRatio%20OK.pdf
> and
> http://home.comcast.net/~cy56/AspectRatio%20bug.png
>
> DiscretePlot3D[
> x * y,
>
> {x, -2, 2},
> {y, -2, 2},
>
> PlotRange -> {{-4, 4}, {-4, 4}, {-4, 4}},
> AspectRatio -> 1,
>
> ExtentSize -> 0.75,
>
> AxesLabel -> {"x", "y", "z"},
> PlotStyle -> Opacity[0.5],
> ColorFunctionScaling -> False,
> ColorFunction -> (Hue[0.35 (#3 + 4)/8 ] &)
> ]
>
> Here's a simpler example (which I should have done first):
>
> Plot3D[
> x y,
>
> {x, -2, 2},
> {y, -2, 2},
>
> AspectRatio -> 1
> ]
>
> Again, the bounding box starts off the wrong shape (not as tall as it is
> wide) and when you try to rotate it, the shape and size jump around
> unpredictably. It's only a cube, the way it should be, about half the time
> you're rotating it.
>
> Chris Young
> cy56@comcast.net
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web