pro OplotIst3Spin,file ;csee 2004.12.12 ; This program over-plots the IST3 CO1 Spin profile over the existing plot if n_params() eq 0 then file = 'C:\idl_programs\csee\ptest\ist3_spin_profile.out' ;needs this file close,1 openr,1,file line='' Mins=0.0 Sp=0.0 readf,1,line if strpos(line,'Minutes') eq -1 then begin ;wrong file print,'This is not the IST3 Spin Rate 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) Spin=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,Sp Minutes(i)=Mins Spin(i)=Sp i=i+1 endwhile ;______________________________ ;plot the data.... oplot,Minutes,spin,linestyle=1,thick=2 legend1=!x.crange(0)+(!x.crange(1)-!x.crange(0))*.25 ;legend start @ 1/4 page legend2=!x.crange(0)+(!x.crange(1)-!x.crange(0))*.33 ;line end at .33 x page legend3=!x.crange(0)+(!x.crange(1)-!x.crange(0))*.35 ;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 end