MathGroup Archive 2009

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

Search the Archive

Re: Exporting a discrete Manipulate[] sequence?

  • To: mathgroup at
  • Subject: [mg98135] Re: [mg98102] Exporting a discrete Manipulate[] sequence?
  • From: John Fultz <jfultz at>
  • Date: Tue, 31 Mar 2009 04:17:43 -0500 (EST)
  • Reply-to: jfultz at

On Mon, 30 Mar 2009 04:43:30 -0500 (EST), AES wrote:
> OK, I've got a nice Manipulate[] command set up with one of the
> variables running through a discrete sequence, and I want to export one
> complete cycle of the plots produced by running through that sequence
> into an external file (e.g., a QuickTime movie, or a PDF document) or an
> external folder (ef.g., a sequence of image or PDF files).
> Possible to get this information back out into the real world, without
> either (a) manually stepping through the sequence and manually Exporting
> the graphic at each step, or (b) reprogramming the underlying expr into
> a separate animation or Export[] loop?

There's no super-convenient way to export a sequence of image files (aside from 
one of the methods you already mentioned), but you can export an animation in 
AVI or SWF (Flash) pretty easily.  If the Manipulate only has the one variable 
and it's already in the discrete sequence you want, then you can just use Export 
as so...

 ControllerManipulate[Plot[Sin[n x], {x, 0, 10}], {n, 1, 5, 1}]]

The reason I use ControllerManipulate here is that it will produce an image
which has no controls or panel of any sort, which I presume is what you want.  
But you can also Export as a Manipulate if you so choose.

If the default Export doesn't do what you want, then you can make an explicit 
list of bookmarks to export through.  By default, Mathematica will interpolate 
between the bookmarks, so we'll have to kill that, too...

 ControllerManipulate[Plot[Sin[n x], {x, 0, 10}], {n, 1, 5, 1}, 
  InterpolationOrder -> 0, 
  Bookmarks -> Map[# :> (n = #) &, Range[5] (* <- list of discrete values *)]]]

This also makes for a more compact swf file, so you might prefer this method.  
If you have other variables you want to fix, you could assign them a fixed
value on the right-hand side of the RuleDelayed.

John Fultz
jfultz at
User Interface Group
Wolfram Research, Inc.

  • Prev by Date: Re: Re: What's going on here (Table-generated lists)?
  • Next by Date: Interpolation -> segfault?
  • Previous by thread: Re: Exporting a discrete Manipulate[] sequence?
  • Next by thread: extracting points and projecting