Re: text in 3d graph

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

```Janwillem,

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
statement.

Needs["DrawGraphics`DrawingMaster`"]

Draw3DItems[
{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 =
DontShow@Draw3DItems[
{Draw3D[Sin[x y], {x, 0, 3}, {y, 0, 3}]},
Axes -> True,
Ticks -> None,
AxesLabel -> {x, y, None},
ImageSize :> 450];

Draw2D[
{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

From: janwillem van dijk [mailto:j.vandijk at nrg-nl.com]
To: mathgroup at smc.vnet.net

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
effect.
Must be simple but I cannot find it.

Thanks for the help,
Janwillem

```

• 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