Saving iTool Windows

Use the ISAVE procedure to programmatically save the contents of the an iTool to an image or iTool Save file.

For example, the following lines of code create a plot visualization and save the contents of the window as a JPEG file.

outfile = DIALOG_PICKFILE(FILE='plot.jpg', PATH=GETENV('IDL_TMPDIR'))
IPLOT, RANDOMU(seed, 10), /INSERT_LEGEND
ISETPROPERTY, 'plot', COLOR=[100,200,50], THICK=2
ISETPROPERTY, 'legend item', ITEM_TEXT='Random Values'
ISAVE, outfile

The filename argument to the ISAVE procedure must include an extension that corresponds to a registered iTool file writer. Registered file writers are listed in the iTool window's Save As... dialog, and are discussed in Exporting and Saving Data.