; ;------------------------------------------------------------------ ; pro sltxax,ut,glon0,glon1,pos,yoff,charsize=chsize ; ; Draw a slt x-axis below existing longitude axis: ; if n_elements(chsize) le 0 then chsize = 1. if n_elements(pos) ne 4 then begin print,'>>> sltxax: need 4-elements in pos <<<' return endif if glon0 lt -180. or glon1 gt 180. then begin print,'>>> sltxax: bad glon0=',glon0,' OR bad glon1=',glon1 return endif if glon0 gt glon1 then begin print,'>>> sltxax: glon0 must be <= glon1: glon0,1=',glon0,glon1 return endif xll=pos(0) & yll=pos(1) & xur=pos(2) & yur=pos(3) yax = yll-yoff ; ; Draw the axis: ; plots,[xll,xur],[yax,yax],/norm ; ; Draw tics every 4 hours through a day: ; nhrs = 7 ihrs = [0,4,8,12,16,20,24] ticlen = .008 nminor = 4 dlonax = glon1-glon0 if dlonax eq 0. then dlonax = 360. for i=0,nhrs-1 do begin glon = fslt(ihrs(i),ut,dum,3) dlon = glon-glon0 & if dlon lt 0. then dlon = glon+360.-glon0 xpos = xll + (dlon*(xur-xll)) / dlonax if xpos ge xll and xpos le xur then begin plots,[xpos,xpos],[yax,yax+ticlen],/norm if ihrs(i) ne 24 then $ lab = strcompress(string(ihrs(i),format="(i2)"),/remove_all) $ else lab = '0' xyouts,xpos,yax-.03,lab,charsize=chsize,align=.5,/norm ; ; Minor tics: ; for ii=1,nminor-1 do begin glon = fslt(ihrs(i)+ii,ut,dum,3) dlon = glon-glon0 & if dlon lt 0. then dlon = glon+360.-glon0 xxpos = xll + (dlon*(xur-xll)) / dlonax if xxpos ge xll and xxpos le xur then $ plots,[xxpos,xxpos],[yax,yax+.5*ticlen],/norm endfor ; ; Label right end if on even hour: ; if xpos eq xll and dlonax eq 360. then begin plots,[xur,xur],[yax,yax+ticlen],/norm if ihrs(i) ne 24 then $ lab = strcompress(string(ihrs(i),format="(i2)"),/remove_all) $ else lab = '0' xyouts,xur,yax-.03,lab,charsize=chsize,align=.5,/norm endif endif endfor xyouts,.5*(xll+xur),yax-.06,'LOCAL TIME (HRS)',align=.5,/norm return end