;;; consurf.pro: to run this script, at the idl prompt type ;;; .run consurf ;;; ;;; contains plots of contours and surfaces ;;; ;;; requires data file mydata.dat ; define data arrays needed mydata = fltarr(49, 49) go = strarr(1) ;;;;;;;;;;;;;;;;;;;;; contour plots ;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; read in data file mydata.dat, store in array mydata openr,1,'mydata.dat' while not EOF(1) do readf, 1, mydata close, 1 ; set postscript font to be used !p.font=0 device,font='-adobe-helvetica-bold-r-normal-*-16-*-*-*-*-*-*-*' ; 2-D contour plot of mydata contour, mydata, title='Contour Plot' print, 'Hit return to continue' readf, 0, go ; 2-D contour plot with contour labels, 6 contour levels contour, /follow, mydata, nlevels=6, title='Contour Plot' print, 'Hit return to continue' readf, 0, go ; 2-D contour plot with 25 contour levels contour, mydata, nlevels=25, title='Contour Plot' print, 'Hit return to continue' readf, 0, go ;;;;;;;;;;;;;;;;;;;; surface plots ;;;;;;;;;;;;;;;;;;;;;;; ; surface plot of mydata surface, mydata, title='Surface Plot', xtitle='x axis',ytitle='y axis', $ ztitle='z axis', /save print, 'Hit return to continue' readf, 0, go ; add 3-D contours to surface plot above contour, mydata, nlevels=8, /t3d, /noerase print, 'Hit return to continue' readf, 0, go ; shaded surface plot shade_surf, mydata print, 'Hit return to continue' readf, 0, go ; shaded surface plot with lighting determined by height shade_surf, mydata, shades=bytscl(mydata) print, 'Hit return to continue' readf, 0, go ; overkill: combination surface/contour plots show3, mydata end