Multiplot Plugin, Version 1.5
The Multiplot plugin provides an easy to use Tcl text interface for plotting one or more datasets (in the vertical axis) versus another axis (the horizontal axis). Many instances of Multiplot can be created concurrently, through the use of handles which are returned when new plots are created. Creation of a new graph doesn't interfere with existing ones.
Author:Jan SaamInstitute of Biochemistry Charite Berlin Germany saam@charite.de Contributing Authors:Axel Kohlmeyer <akohlmey@gmail.com>: support for using multiplot as a non-toplevel widget.Nadja Lederer <nadja_lederer@gmx.at>: support for deleting objects created with draw. James Gumbart <gumbart@ks.uiuc.edu>: support for changing the plot range.
Using MultiplotFirst you must create a plot using the multiplot command which returns a handle to the new plot. The handle allows to control this plot independently of other plots you might create.set plothandle [multiplot ?reset|list|embed
|
NAMDPlot results displayed using Multiplot plugin
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The options are used to define the plot. They are described further below. Note that you can create an empty plot and provide data and configure it any time later using the plothandle. Once you have a plothandle you can use it to control the plot: $plothandle add|replot|namespace|configure|data|export|quit ?options?
Options for the plothandle:
Example:package require multiplot set x {-2 -1 0 1 2 3 4 5 6 7 8 9 10} set y {-2 0 2 3 4 5 5 4 3 2 1 0 1} # This plot will be immediately created because we specified -plot set plothandle [multiplot -x $x -y $y -title "Example plot" -lines -linewidth 3 -marker point -plot] # Now we change the appearence of the existing plot. # BUT WE WON'T SEE THIS change until the next replot is requested! $plothandle configure -fillcolor yellow -radius 6 # Let's add a vertical dotted line at x=3 $plothandle configure -vline {3 -width 2 -fill red -dash "."} # And now redraw the plot so that the changes become visible: $plothandle replot; # It's time to add a second dataset to the same plot set y2 {8 7 6 6 5 4 4 3 2 3 4 3 1} $plothandle add $x $y2 -fillcolor green -radius 4 -plot # Of course we can change the appearence of the the two sets independently: $plothandle configure -set 1 -lines -linewidth 4 -dash "," -plot # Export to xmgrace, load with 'xmgrace -nxy /tmp/foo.plot' $plothandle export xmgrace /tmp/foo.plot # Close the plot $plothandle quit |