Saving Plots

You can also export the PlotML from a plot within Vergil and then write an applet that will display that data.

The way to export the plot is to run your model, and then move the cursor into the plotter, I usually place it just to the right of the plot title and type a capital D. This will dump PlotML to standard out. If you type a question mark, then you will get a list of what other key commands that will export the data as EPS.

Note that for this to work, you will need to run Vergil from the command line, so you can see the standard output. I had to run the $PTII/bin/vergil script, the $PTII/vergil.exe file that Installshield builds did not print any data out.

Ideally, Ptolemy would have a save as applet feature that would save your plot as an applet. You can then write an html page that displays your PlotML file. The easiest way to do this is to start with a similar applet and modify it. $PTII/ptolemy/plot/demo/Marks.htm is a good place to start, it can be found online at http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII1.0/ptII1.0/ptolemy/plot/demo/Marks.htm

You could try substituting in your data into the $PTII/ptolemy/plot/demo/plotmlSample.txt file.