PublishPlot
PublishPlot's main goal is to create plots for print or on-line publications. Once your work is accepted and published, however, you might be invited to present the results of that publication at a conference. It is possible your talk would be enhanced by using plot animations. This help topic demonstrates one method for creating plot movies in PublishPlot.
Script Name | Installation Steps | Date |
---|---|---|
Animate Spiral |
|
4 Apr 2021 |
To try an animation, choose "Animate Spiral" from the "Scripts" menu. You can edit the script in Apple's Script Editor to change features of the plot or to pick a location for saving plot frames. See comments in the script for details. This script is just a demonstration of plot animation in PublishPlot using a script. See the next section for how it works and how you can create your own animations.
A plot movie is a series of frames where each frame has a plot with slightly different data. Once created, these frames are stiched together into a movie file using various movie creation software tools (such as the free Fiji). Creating a series of images is best automated using a script. The logic of that script (or any movie script) is as follows:
xpts
and ypts
).plot table data
command and start two new lists with those first two points (e.g., xdraw
and ydraw
).xpts
and ypts
and add them one at a time to xdraw
and ydraw
.plot data
of the plotted data set started in step 2 to the growing xdraw
and ydraw
. This set will cause the plot to redraw. For good visual experience, delay the script after plotting each frame.plot data
, export the plot to a PDF file using the export pdf
command. Note that due to restrictions Apple places on writing files, you must export to the "Pictures" folder of your home directory (it can be any subfolder in that folder). To help with movie-making software, the files should have similar names but end in a number that is incremented for each frame.To create your own and different animations, you can copy the "Animate Spiral" script and then change the code related to plotting a spiral to new code plotting the data you want to animate. Most other parts of the script (such as choosing frame frame length, frame rate, and exporting plot frames) will remain about the same.