Here is a quick review of how to make a postscript file and print it out.
Within IDL, do the following:
IDL> set_plot,'ps'
IDL> plot,spectype,eqw,xtitle='Spectral Type',ytitle='Equivalent Width'
IDL> set_plot,'x'
This tells IDL to (1) direct all the following graphics commands to a file, (2) plot the arrays "spectype" and "eqw" to the X & Y axes respectively, and (3) then resets the default device to Xwindows, so all further plots will go to the normal plotting window. This assumes that you have setup arrays called "spectype" and "eqw" that hold your data. The plot command is very flexible and can take a number of "keywords" that affect the appearance of your plot. I've shown you xtitle and ytitle in the example above, plus you've seen xrange in class. If you are interested in trying to refine your plot, type
IDL> ?
at the IDL prompt, which will bring up the on-line help window. If you click on "Alphabetical List of Routines", you can select the help file for PLOT. This will show you all of the keywords accepted by "PLOT" that you might want to try out, including xrange,yrange,linestyle,psym,symsize,xtitle,ytitle,title, etc.
If you are interested in finding out more about IDL plots, more detailed examples exist on Dr. O'Connell's IDL for Astronomers website that is linked from the class website. Go to IDL for Astronomers and select item #12, plots, from the contents list.
If you have a list of equivalent widths, ew1,ew2,ew3,etc..., you can turn them into an array by typing:
IDL> eqw=[ew1,ew2,ew3,ew4]
If you have 25 values, and so you can't fit them all in one line, you can break this up into multiple lines by doing the following:
IDL> eqw=[ew1,ew2,ew3,ew4,ew5,ew6]
IDL> eqw=[eqw,ew7,ew8,ew9,ew10,ew11]
IDL> eqw=[eqw,ew12,ew13,ew14,ew15]
and so on. In IDL what you have done is to first define a 6 element array called eqw. The second line tells IDL that you want to redefine eqw to be an 11 element array by adding 5 more elements to the original array, and so on.
After setting the plot device to 'ps' and issuing the plotting commands, you will have a file in your directory called "idl.ps". If you want to look at the file, type:
ghostview idl.ps &
at the UNIX prompt, or:
IDL> $ghostview idl.ps &
from within IDL.
If it looks ok, print the file by typing:
lpr idl.ps or IDL> $lpr idl.ps
If your plot doesn't seem to come out of the printer in 216 Osmond, you can try:
lpr -POsmond-216 idl.ps
however, this shouldn't be necessary.
If there are any problems, please let me know. Thanks!