RE: animation
- To: mathgroup at smc.vnet.net
- Subject: [mg45120] RE: [mg45073] animation
- From: "Ingolf Dahl" <ingolf.dahl at telia.com>
- Date: Wed, 17 Dec 2003 07:54:36 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Here is one way, if you like it, but it does not behave exactly as the native Wolfram animation. The For and Do loop constructions are equivalent in this context. Check my recent message [mg45062] for more information on ShowToTaggedCell! ShowToTaggedCell[plot_, celltag_] := If[NotebookFind[EvaluationNotebook[], ToString[celltag], All, CellTags] == $Failed, CellPrint[ Cell[TextData[{Cell[ GraphicsData["PostScript", DisplayString[plot]]]}], "Graphics", CellTags -> ToString[celltag]]], , NotebookWrite[EvaluationNotebook[], Cell[TextData[{Cell[ GraphicsData["PostScript", DisplayString[plot]]]}], "Graphics", CellTags -> ToString[celltag]]]]; Do[sintable[i] = Table[{x, Sin[x - Pi*i/18]}, {x, 0, 2*Pi, Pi/12}], {i, 1, 36}] (* Replace the Sin function, increments and limits with your own data *) For[i = 1, i <= 36, plot[i] = ListPlot[sintable[i], DisplayFunction -> Identity]; i++] Do[ShowToTaggedCell[plot[i], "figure"]; Pause[0.1], {i, 1, 36}] Ingolf Dahl ingolf.dahl at telia.com >-----Original Message----- >From: M.L. Bondar [mailto:mbondar at win.tue.nl] To: mathgroup at smc.vnet.net >Sent: Tuesday, December 16, 2003 12:21 >To: mathgroup at smc.vnet.net >Subject: [mg45120] [mg45073] animation > > > >I have the following problem with Mathematica. > > > I need to make an animation and I use For[i=1, i<=n ListPlot[.....]; i++] > which creates n plots. After that I double click on the grouping bracket >to the right of the plots to close the group and animate it. > >Is there any possibility to make the animation avoiding the ploting of >all n plots? > >Thank you in advance. > >Regards, > >Luiza Bondar > >