This simple procedure comes to you due to the efforts of a number of students
who gave many minutes offering advice. If you want to understand it fully, then
Google "IDL legend."
pro plotting
readcol,'opacities.dat',T,Pe,Neutral,Negh,Scattering
set_plot,'ps'
device,/portrait,filename='opacity.ps',/color,/bold,set_font='Times',/tt_font
lines= indgen(3)
plot,T,Neutral,xrange=[4830,10000],xstyle=1,yrange=[-6,3],ystyle=1,xtit='Temperature (K)',ytit='Log(Opacity)',linestyle=0
oplot,T,Neutral,color=252,linestyle=0
oplot,T,Negh,color=000,linestyle=1
oplot,T,Scattering,color=50,linestyle=2
legend,['Neutral Hydrogen','Negative H Ion','Total Scattering'],linestyle=lines,colors=[252,000,50],textcolors=[252,000,50]
device, /close
end