next up previous contents
Next: Lecture 2: Programming in Up: Printing your graph. Previous: Printing your graph.   Contents

Eg printing the MODTRAN graph

Running the code below should print the modtran graph (boring as it is!) to an .eps file (or .ps if you wish, if the encapsulated keyword is removed).

modtrandata=fltarr(14,201)
openr,1,'~lecjm/public_html/Teaching/IDL_course/Data/pldat.dat'
readf,1,modtrandata
close,1
;;;;;;;;; switch to postscript output ;;;;;;;
set_plot,'ps'
;;;;;;;; set the name of the output file (default=idl.ps)
device,file='modtran.ps'
;;;;;; Now make the plot ;;;;;;
plot,modtrandata(1,*),modtrandata(11,*), $
  xtitle='Wavelength / microns',$
  ytitle='Radiance in Watts/(cm!U2!N Steradian Micron !4l!3m)'
;;;;;; Close the postscript file 
device,/close
;;;;; switch back to X Window system ;;;;;;;
set_plot,'x'
end
Note also the use of
device,file='~lecjm/modtran.eps',/encapsulated
Here the general rule of using ``backslash'' keyword being equivalent to keyword=1 e.g.
\encapsulated

Note the !U or !E which gives you the superscript. !B gives you subscript. !4 gives you Greek and !3 returns you to English. So,

plot,modtrandata(1,*),modtrandata(11,*), $
  xtitle='Wavelength (!4l!3m)',$
  ytitle='Radiance (W/(cm!U2!N Steradian !4l!3m))'

should give you microns.



lecjm 2008-11-06