MathGroup Archive 2002

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

Search the Archive

Re: Animation in one frame?

  • To: mathgroup at
  • Subject: [mg33049] Re: [mg33003] Animation in one frame?
  • From: Omega Consulting <omega_consulting at>
  • Date: Wed, 27 Feb 2002 00:48:09 -0500 (EST)
  • Sender: owner-wri-mathgroup at

At 12:31 AM 2/25/2002, William Hill wrote:
>Hey there ...
>Is there some option to have MoviePlot ( or whichever function is
>appropriate ) animate a plot of f(x,t) in one cell only? That is, to display
>the first plot, erase it, display the next, and so on, instead of having a
>long sequence of cells being generated.
>Thanx In Advance ...

This will do the trick.

GraphicsCell[gr_] :=
   Cell[GraphicsData["PostScript", DisplayString[gr]],"Graphics"]

ReplaceGraphic[gr_] :=
     SelectionMove[nb, All, GeneratedCell];
     NotebookWrite[nb, GraphicsCell[gr]]

AnimateInPlace[{first_, rest___}] :=
     Scan[ReplaceGraphic, {rest}])

Try it out.

       Plot[a x/10, {x,0,1}, PlotRange->{0,1},


Omega Consulting
"The final answer to your Mathematica needs"

Spend less time searching and more time finding.

  • Prev by Date: Solve (on Mathematica 4.1 Windows XP)?
  • Next by Date: Re: need a function for sums of subsets
  • Previous by thread: Re: Animation in one frame?
  • Next by thread: Partial derivatives and implicit inversion?