There are several ways to print the graphs you create.
Set_Plot, 'PRINTER'This will send your output to the system printer. Be sure and do this before you issue the plot command. Then, after you have plotted, you must enter the close document command:
DEVICE, /Close_Document
Here's the simple way to spawn to the printer:
Set_Plot, 'PS'Notes that you must close the postscript file before spawning. You don't have to close the file if you don't spawn, but your postscript file won't be anything but null until you exit IDL. Having the Close_File in there is a generally good idea.
DEVICE, FILENAME = 'ABPlot.ps'Plot, A, B
DEVICE, /Close_File
Spawn, 'lpr ABPlot.ps'
Here's the fancy way to spawn to the printer:
PRO output_plot, New_fileFor documentation on how this works, see page 98, of the IDL Reference Guide, Printing Graphics Output Files.DEVICE, /Close
file = 'idl.' + StrLowCase(!D.ps)cmd = 'lpr ' + file
If N_Elements(New_file) GT 0 then $
cmd = cmd + '; mv' + file + ' ' + New_fileSpawn, cmd
END