MathGroup Archive 2006

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

Search the Archive

RE: Graphics3D axes

  • To: mathgroup at
  • Subject: [mg66670] RE: [mg66640] Graphics3D axes
  • From: "David Park" <djmp at>
  • Date: Fri, 26 May 2006 04:17:46 -0400 (EDT)
  • Sender: owner-wri-mathgroup at


The DrawGraphics Mathematica package that can be purchased through my web
site ($50) amoung other things contains a DrawAxes command for Graphics3D.
The syntax is...

DrawAxes[{xorg, yorg, zorg}, {min, max}, styles]

where {min, max} are the displacements from the axes origin in plot
coordinates. styles gives a list of line styles for the 3 axis. The axes
could be labeled by adding separate Text statements. With DrawGraphics it is
easy to add all these things into a plot because all elements are treated as
graphics primitives. Thus multiple surfaces, axes and Text statements can
all be easily combined in one plot statement.

Here is an example of its use that combines a plot of four spheres with a
labeled axes.


sphere[center_, radius_][p_, t_] :=
  center + radius{Cos[t]Cos[p], Sin[t]Cos[p], Sin[p]}
style = {IndianRed, AbsoluteThickness[2]};

            Evaluate[sphere[#, 1][p, t]], {p, -Pi/2, Pi/2}, {t, 0,
              2Pi}] & /@ ({{-2, -2, -2}, {2, 2, 2}, {-2, -2, 2}, {2,
                2, -2}}0.7),
      DrawAxes[{0, 0, 0}, {-3, 3}, {style, style, style}],
        Text[#1, #2, #3] &, {{x, y, z},
      {{3.3, 0, 0}, {0, 1, 0}, {0, 0, 3.3}}, {{0, 0}, {-2, 0}, {0, 0}}}]
    ImageSize -> 300,
    Boxed -> False,
    NeutralLighting[0.8, 0.8, 0.2],
    Background -> AliceBlue];

I used special positioning for the labels of the axes so the y axes label
would not be written over one of the spheres.

David Park
djmp at

From: Laura [mailto:grzz_76 at]
To: mathgroup at

This must be a common query but I haven't been able to find the answer:

For plotting 3D graphics (plot3D or Graphics3D), how do you get the
standard axes: (1,0,0), (0,1,0), (0,0,1)? I've tried all sorts of options
from AxesEdges to changing Views. Basically, I'd like my 3D plots to appear
with the axes set at the origin.

       (0,0,0) |______ y

Thank you for any pointers.

  • Prev by Date: Re: Re: Interval[{a,b}]-Interval[{a,b}] = 0?
  • Next by Date: Re: Interval[{a,b}]-Interval[{a,b}] = 0?
  • Previous by thread: Re: Re: Graphics3D axes
  • Next by thread: RE: Graphics3D axes