MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Automatic & linked axis scaling

  • To: mathgroup at
  • Subject: [mg64969] Re: [mg64940] Automatic & linked axis scaling
  • From: "David Park" <djmp at>
  • Date: Fri, 10 Mar 2006 05:15:00 -0500 (EST)
  • Sender: owner-wri-mathgroup at

It looks to me like that is exactly what Mathematica does, at least if you
use ParametricPlot3D.  Look at the following. They appear to me to have
equal scaling on all axes.

    {x, y, Sin[x y]}, {x, -Pi, Pi}, {y, -Pi, Pi}];

    {x, y, 5Sin[x y]}, {x, -Pi, Pi}, {y, -Pi, Pi}];

    {x, y, Sin[x y]}, {x, -2Pi, 2Pi}, {y, -2Pi, 2Pi}];

If you did it in DrawGraphics where you could easily add other objects, you
also get equal scaling on all axes.


        {x, y, Sin[x y]}, {x, -Pi, Pi}, {y, -Pi, Pi}]},
    Axes -> True];

You have to use the BoxRatios option if you don't want equal scaling.

David Park
djmp at

From: ggroup at [mailto:ggroup at]
To: mathgroup at


I'm trying to find an automated way to scale the axes of graphics such that
that one unit takes up the same distance on all axes.  I'm modelling
objects, and often want to see various phenomenon superimposed onto that
object.  It would be nice if I could avoid having the view distorted by
independent axis scaling.

On a 2D graphic, I can do this manually by specifying the AspectRatio.  I
need to set it using the ratio of the length of the y-range to the length of
the x-range.  Of course, along with that, I need to explicitly specify
corresponding values for the PlotRange.

This becomes a bit of a pain when developing a model and/or coding.  Usually
the object range is well defined, but one of the other graphic objects will
have bounds that are ill-defined (say I want to add arrows indicating
calculated surface normals).

Does anyone have a good generic solution?


  • Prev by Date: The D'Agostino Pearson k^2 test implemented in mathematica / variance of difference sign test
  • Next by Date: Re: Bizarre results with TreePlot
  • Previous by thread: Automatic & linked axis scaling
  • Next by thread: Mathematica and Education