MathGroup Archive 1998

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

Search the Archive

The trouble with StackGraphics (TransformGraphics3D not in Help index)


Anyone has a guess why the Function TransformGraphics3D from the package
Graphics`Graphics3D` does not show up in the Help index or anywhere
else? ("TransformGraphics3D[graphics3d, f] applies the function f to
all lists of coordinates in graphics3d.")

It is the key to make the StackGraphics function usable. StackGraphics
stacks n plots in the y-direction at i/n, i.e., between y=1/n and y=1.
If you want to use the y-axis with some meaningful numbers you have a
problem. TransformGraphics3D can solve it. The following is not very
beautiful, but it works. Suggestions welcome!

In[11]:=    <<Graphics`Graphics3D`

In[62]:=    y=Range[3,6]; (* some y values *)

In[58]:=    plots=Plot[# Exp[-(x-#)^2],{x,0,
10},DisplayFunction->Identity]&/@y; (* some sample plots *)

In[15]:=    yScale[y_,lst_List]:=
With[{n=Length[lst],f=First[lst],l=Last[lst]},((l-f)n y+n f -l)/(n-1)]
(* scaling the y-axis*)

In[64]:=    Show[TransformGraphics3D[
                   
StackGraphics[plots],{#[[1]],yScale[#[[2]],y],#[[3]]}&],
                        PlotRange->All,Axes->True]; (* stacked plots
with proper y values *)



  • Prev by Date: Re: mathematica and statistics
  • Next by Date: Monte Carlo simulations on a Mac??
  • Previous by thread: Re: help!!
  • Next by thread: Monte Carlo simulations on a Mac??