Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: pgplotmanager.record - Function Up: pgplotmanager - Tool Previous: pgplotmanager.resetplotnumber - Function


pgplotmanager.displaylist - Function



Package display
Module plotter
Tool pgplotmanager


return the displaylist currently in use


Synopsis
displaylist()



Description
The pgplotmanager tool maintains a record of plot commands that have been issued (when recording is turned on, see record() and recording()) in the form of a displaylist tool. This function returns a reference to that tool. Because a reference is returned, you should be careful that you don't damage it.

The most common use of this tool might be to temporarily pass the displaylist to another pgplotmanager tool. In this case, ownplaylist parameter to the constructor should be set to F to prevent the second pgplotmanager tool does not shut it down. (See example below.)

You could also use this function to, for example, go backwards through the plot command to find the last data plotted, extract it, fit it, and plot the fit to the data.



Returns
displaylist tool



Example
This example shows how the commands sent to a pgplot widget could be replayed to a file. In practice, this can be done more straightforwardly with the pgplotwidget tool's postscript function.
# create the widget
f := frame();
pgpa := pgplot(f);
pgpw := pgplotmanager(pgpa);
pgpa := F;

# do some plotting
pgpm.env(0, 2 * pi, -1, 1, 0, 0);

# create a manager of a postscript file, passing in the displaylist
# from the widget
dl := pgpw.displaylist();
pgpf := pgplotps('plot.ps', playlist=dl, ownplaylist=F);

# replay plotting commands to file
pgpf.refresh();
pgpf.done();      # PostScript file is now closed

# do some more plotting in the widget
pgpw.arro(1, -1, 5, -0.5);


next up previous contents index
Next: pgplotmanager.record - Function Up: pgplotmanager - Tool Previous: pgplotmanager.resetplotnumber - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15