pro OplotIst3Alt,file ;csee 2004.12.12 ; This program over-plots the IST3 CO1 altitude profile over the existing plot if n_params() eq 0 then file = 'C:\idl_programs\csee\ptest\ist3_alt_profile.out' ;needs this file openr,1,file line='' Mins=0.0 Alt=0.0 readf,1,line if strpos(line,'Minutes') eq -1 then begin ;wrong file print,'This is not the IST3 Altitude File: ',file goto,exit endif ;______________________________ ;count the number of lines... nlines=0 while not eof(1) do begin readf,1,line nlines=nlines+1 endwhile Minutes=fltarr(nlines) Altitude=fltarr(nlines) ;______________________________ ;read in the data.... close,1 openr,1,file readf,1,line ;first line is header i=0 while not eof(1) do begin readf,1,Mins,Alt Minutes(i)=Mins Altitude(i)=Alt i=i+1 endwhile oplot,Minutes,altitude,linestyle=1,thick=2 legend1=!x.crange(0)+(!x.crange(1)-!x.crange(0))*.15 ;legend start @ 1/4 page legend2=!x.crange(0)+(!x.crange(1)-!x.crange(0))*.23 ;line end at .33 x page legend3=!x.crange(0)+(!x.crange(1)-!x.crange(0))*.25 ;legend text @ ~1/3 page ypos=0.85*!y.crange(1) oplot,[legend1,legend2],[ypos,ypos],linestyle=1,thick=2 xyouts,legend3,ypos,'IST3 TAT',font=0, charsize=.8 ;;left=!x.crange(0) ;left end of plot ;;xrange=!x.crange(1)-!x.crange(0) ;x axis range ;;oplot,[left+.03*xrange,left+.11*xrange],[10,10],linestyle=1,thick=2 ;;xyouts,left+.13*xrange,10,'IST3 TAT',font=0, charsize=.8 exit: close,1 Print,'Done!' end