MathGroup Archive 2005

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

Search the Archive

Re: text in 3d graph

  • To: mathgroup at
  • Subject: [mg60655] Re: [mg60620] text in 3d graph
  • From: "David Park" <djmp at>
  • Date: Fri, 23 Sep 2005 04:20:03 -0400 (EDT)
  • Sender: owner-wri-mathgroup at


The following works - but just barely. If you try to move the label a little
more to the left it will be lost. It uses the idea of adding a 2D Text


    {Draw3D[Sin[x y], {x, 0, 3}, {y, 0, 3}]},
    PlotRegion -> {{0.1, 1}, {0, 1}},
    SphericalRegion -> True,
    Epilog -> Text[Sin[x y], {0.0275239, 0.399782}, {0, 0}, {-0.2, 1}],
    ImageSize :> 450];

Basically, the problem is that Mathematica will not let you plot reliably
outside the bounding box, and it will not let you rotate 3D axes labels. And
in general, Mathematica has a poor and ill defined method for adding
elements outside of the PlotRange.

Also, if the label is vertical it is misaligned, and if it is tilted to
match the bounding box it is poorly rendered. Given all these problems I
would consider putting the information in the PlotLabel or in a horizontal
Text message.

Another possibility is to put the 3D plot in a Rectangle in a 2D plot. Label
the x and y axes in the 3D plot, but label the z axes in the 2D plot outside
of the Rectangle.

plot1 =
        {Draw3D[Sin[x y], {x, 0, 3}, {y, 0, 3}]},
        Axes -> True,
        Ticks -> None,
        AxesLabel -> {x, y, None},
        ImageSize :> 450];

    {Rectangle[{0, 0}, {1, 1}, plot1],
      Text[Sin[x y], {-0.05, 0.5}, {0, 0}, {0, 1}]},
    PlotRange -> {{-0.2, 1.1}, {-0.1, 1.1}},
    AspectRatio -> Automatic,
    Background -> Linen,
    ImageSize -> 450];

David Park
djmp at

From: janwillem van dijk [mailto:j.vandijk at]
To: mathgroup at

I want to have a text vertical along the z-axes to the left of the
z-axes labels. I am using David Parks Draw3D for this but if I give the
text an x-coordinate to the left of the bounding box (Boxed->True) of
the graph the text disapears.

I tried to create extra margins with PlotRegion but not to the desired
Must be simple but I cannot find it.

Thanks for the help,

  • Prev by Date: Re: Problem in loading the Statistics package.
  • Next by Date: Re: Beginner: Importing files, maintaining file format.
  • Previous by thread: text in 3d graph
  • Next by thread: Vectorization