Re: animation
- To: mathgroup at smc.vnet.net
- Subject: [mg45107] Re: animation
- From: adam.smith at hillsdale.edu (Adam Smith)
- Date: Wed, 17 Dec 2003 07:54:25 -0500 (EST)
- References: <brmq0b$o9g$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
As far as I know, you can't completely avoid plotting all n plots. Mathematica has to produce all the frames prior to animating. But you can have Mathematica automatically group the cells and collapse them to display only the first plot. An example is below Do[Plot[Sin[2 Pi f t], {t, 0, 1}], {f, 1, 3}]; SelectionMove[EvaluationNotebook[], All, GeneratedCell]; FrontEndTokenExecute["CellGroup"]; FrontEndTokenExecute["OpenCloseGroup"]; You will of course replace the Do[ ] with your graphics commands. The next three lines accomplish the automatic grouping and collapsing. Be sure to include all the commands in the same cell. To animate just double click the single plot that is visible. Adam Smith "M.L. Bondar" <mbondar at win.tue.nl> wrote in message news:<brmq0b$o9g$1 at smc.vnet.net>... > 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