IDL treats the screen as one device and a postscript file as another.
Switch devices with the set_plot command:
IDL> set_plot,'ps'will switch to postscript output and
IDL> set_plot,'x'will switch back to the screen.
The device command allows you control which postscript file your output goes to, how big your plot will appear etc.
If you want a .png, .jpeg etc file plot it in a graphics window, using
IDL> set_plot,'x'then read it to file using
IDL> filename='~username/blah.png' IDL> write_png,filename,tvrd()Alternatively, use
IDL> set_plot, 'z' IDL> device, set_resolution=[640,680] IDL> plot, x, y etc... IDL> write_png, 'filename.png',tvrd()