MathGroup Archive 2000

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

Search the Archive

RE: Axis label for StackGraphics

  • To: mathgroup at smc.vnet.net
  • Subject: [mg26058] RE: [mg26047] Axis label for StackGraphics
  • From: "David Park" <djmp at earthlink.net>
  • Date: Wed, 22 Nov 2000 01:55:49 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Philip,

With a little experimentation, it turns out that StackGraphics stacks the
curves in the range 0 to 1, spaced at equal increments, but nothing at zero.
The following statement works:

Show[StackGraphics[tab1], DisplayFunction -> $DisplayFunction,
   Axes -> True, Ticks -> {Automatic, Table[{i/10, i}, {i, 1, 10}],
     Automatic}, AxesEdge -> {Automatic, {1, -1}, Automatic}];

It is necessary to include Axes -> True to obtain the k axis. The Ticks
option specifies the labels for the k axis. The AxesEdge option puts the k
axis labels on a convenient edge of the cube.

Some of the fancier Mathematica plots are confusing because it is not always
clear how they work. In this case, it is almost as easy, and more
controllable, to combine a number of parametric plots.

f[x_, k_] := {x, k, Exp[1 - (x - k)/x]}
g[i_] := ParametricPlot3D[Evaluate[f[x, i]], {x, 0.1, 2},
    DisplayFunction -> Identity]

Show[Table[g[i], {i, 1, 10}], AspectRatio -> Automatic,
   PlotRange -> {{0, 2}, {0, 10}, {0, 600}}, BoxRatios -> {1, 1, 1},
   Axes -> True, Ticks -> {Automatic, Range[10], Automatic},
   AxesEdge -> {Automatic, {1, -1}, Automatic},
   DisplayFunction -> $DisplayFunction];

It is slightly easier, and even more controllable, with my DrawingCube
package (available at my web site):

Needs["Graphics`DrawingCube`"]
Needs["Graphics`ParametricDrawing3D`"]

Show[Graphics3D[{(ParametricDraw3D[Evaluate[f[x, #1]],
        {x, 0.1, 2}] & ) /@ Range[10]}], AspectRatio -> Automatic,
   PlotRange -> {{0, 2}, {0, 10}, {0, 600}}, BoxRatios -> {1, 1, 1},
   Axes -> True, Ticks -> {Automatic, Range[10], Automatic},
   AxesEdge -> {Automatic, {1, -1}, Automatic}];

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/

> -----Original Message-----
> From: Philip M. Howe [mailto:pmhowe at lanl.gov]
To: mathgroup at smc.vnet.net

> Hi All,
>
> Sometimes, I find it very useful to use StackGraphics to make plots
> to visualize parameter effects.  A trivial example results from the
> following:
>
> << Graphics`Graphics3D`;
>
> Clear[k];
> funct[k_] := Module[{eqtn},
>        eqtn = Exp[ 1 - (x - k)/x] ;
>        Plot[eqtn, {x, 1., 2  Pi}, PlotRange -> All,
>          DisplayFunction -> Identity]];
>
> tab1 = Table[funct[k], {k, 1, 10}];
>
> Show[StackGraphics[tab1], DisplayFunction -> $DisplayFunction];
>
>
> I would like to have the values of k included in the plot, along the
> third axis, to identify each curve.  If I change the option Axes ->
> {True, False, True} to Axes -> {True,True, True}, I can get numbers
> on the third axis, but they don't correspond to the values of k.
> Also, for clarity, I may often want the k-values plotted along the
> lower right axis.  Any suggestions?
>
> Thanks in advance for your help.
>
> Phil
>
>



  • Prev by Date: Re: Axis label for StackGraphics
  • Next by Date: Phase Plane Plotting
  • Previous by thread: Re: Axis label for StackGraphics
  • Next by thread: Trouble in saving graphics as eps file.