Changeset 226 for trunk/SRC/ToBeReviewed/PLOTS/axe.pro
- Timestamp:
- 03/16/07 10:22:26 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/PLOTS/axe.pro
r209 r226 8 8 ; pltz and pltt 9 9 ; 10 ; @categories 10 ; @categories 11 11 ; Graphics 12 12 ; 13 13 ; @param COUPE {type=string} 14 ; It designate the type of cut to which the axes we create 14 ; It designate the type of cut to which the axes we create 15 15 ; must report. For example: 'xy','xt'... 16 16 ; 17 17 ; @param TEMPSMIN {in}{required} 18 ; In the case where we do cut containing the time dimension, we have 18 ; In the case where we do cut containing the time dimension, we have 19 19 ; to specify the beginning of the time's axis in julian days. 20 20 ; 21 21 ; @param TEMPSMAX {in}{required} 22 ; In the case where we do cut containing the time dimension, we have 22 ; In the case where we do cut containing the time dimension, we have 23 23 ; to specify the end of the time's axis in julian days. 24 24 ; 25 ; @keyword SIN 25 ; @keyword SIN 26 26 ; activated when we trace in sinus of the latitude 27 27 ; 28 28 ; @keyword SEPDATE {type=string} 29 ; It separate the different constituents of the date. By default, 30 ; it is a return to the line when we do a 'yt', 'zt' or a 't'. 31 ; In the other cases, it is a blank. 29 ; It separate the different constituents of the date. By default, 30 ; it is a return to the line when we do a 'yt', 'zt' or a 't'. 31 ; In the other cases, it is a blank. 32 32 ; 33 33 ; @keyword DIGITSYEAR … … 36 36 ; information on %Z and %Y. 37 37 ; 38 ; @keyword _EXTRA 38 ; @keyword _EXTRA 39 39 ; used to pass your keywords 40 ; 40 ; 41 41 ; @uses 42 42 ; common.pro … … 65 65 tempsun = systime(1) ; pour key_performance 66 66 ;-------------------------------------------------------------- 67 ; Management of ticks of the time axis in the case of TEMPSMIN 68 ; and TEMPSMAX are defin ied67 ; Management of ticks of the time axis in the case of TEMPSMIN 68 ; and TEMPSMAX are defined 69 69 ;-------------------------------------------------------------- 70 70 divday = 0 … … 94 94 ymax-ymin+1 GT 10: BEGIN & freq = 2. & tminor = 4 & datfmt = '%M'+sep+fmtyr & end 95 95 ELSE: BEGIN & freq = 1. & tminor = 4 & datfmt = '%M'+sep+fmtyr & end 96 ENDCASE 96 ENDCASE 97 97 nticks = ceil((ymax-ymin)/freq) + 2 98 98 yminf = (floor(ymin/freq))*freq … … 174 174 for mn = 0, nticks-1 do ticknom[mn] = julday(mmin, dmin, ymin, hmin, mnminf + freq*mn, 0, _EXTRA = ex) 175 175 ticknom = ticknom[where(ticknom GE tempsmin AND ticknom LE tempsmax, nticks)] 176 datfmt = '%H:%I' 176 datfmt = '%H:%I' 177 177 END 178 178 ; second base … … 201 201 dummy = label_date(0, 0, 0, DATE_FORMAT = datfmt, _EXTRA = ex) 202 202 if chkstru(ex, 'DATE_FORMAT') then ex.DATE_FORMAT = '' 203 ENDIF 203 ENDIF 204 204 ;-------------------------------------------------------------- 205 205 ; Definition of axes parameters case by case 206 206 ;-------------------------------------------------------------- 207 207 case coupe of 208 'pltv':BEGIN 208 'pltv':BEGIN 209 209 dtasize = tempsmin 210 210 !x.range = [-0.5, dtasize[0] - 0.5] 211 !y.range = [-0.5, dtasize[1] - 0.5] 211 !y.range = [-0.5, dtasize[1] - 0.5] 212 212 if keyword_set(reverse_x) then !x.range=reverse(!x.range) 213 213 if keyword_set(reverse_y) then !y.range=reverse(!y.range) … … 215 215 !y.title = 'ny' 216 216 END 217 'xy':BEGIN 217 'xy':BEGIN 218 218 if keyword_set(reverse_x) then !x.range=[lon2,lon1] ELSE !x.range=[lon1,lon2] 219 219 if keyword_set(reverse_y) then !y.range=[lat2,lat1] ELSE !y.range=[lat1,lat2] … … 221 221 IF key_onearth THEN !y.tickformat='lataxe' 222 222 END 223 'yz':BEGIN 223 'yz':BEGIN 224 224 if keyword_set(reverse_x) then !x.range=[lat2,lat1] ELSE !x.range=[lat1,lat2] 225 225 if keyword_set(reverse_y) then !y.range=[0, -1] ELSE !y.range = [-1, 0] … … 227 227 ; number of ticks by default 228 228 plot, [0], [0], /noerase, /nodata, xtick_get = xaxe 229 ; We increase this number to it be around 10 229 ; We increase this number to it be around 10 230 230 ticks = n_elements(xaxe)-1 231 231 ticks = ticks*[1, 2, 4, 8] … … 241 241 endif 242 242 end 243 'xz':BEGIN 243 'xz':BEGIN 244 244 if keyword_set(reverse_x) then !x.range=[lon2,lon1] ELSE !x.range=[lon1,lon2] 245 245 if keyword_set(reverse_y) then !y.range=[0, -1] ELSE !y.range = [-1, 0] … … 252 252 ; result = LABEL_DATE(DATE_FORMAT = '%M'+sep+fmtyr) 253 253 ; !y.tickformat='LABEL_DATE' 254 !y.tickname = LABEL_DATE(1, 0,ticknom,_EXTRA = ex) 254 !y.tickname = LABEL_DATE(1, 0,ticknom,_EXTRA = ex) 255 255 !y.ticklen=1. 256 256 !y.gridstyle=2 … … 266 266 if keyword_set(reverse_y) then !y.range=[lat2, lat1] ELSE !y.range=[lat1,lat2] 267 267 IF key_onearth THEN !y.tickformat='lataxe' 268 !x.tickname = LABEL_DATE(0, 0,ticknom,_EXTRA = ex) 268 !x.tickname = LABEL_DATE(0, 0,ticknom,_EXTRA = ex) 269 269 !x.ticklen=1. 270 270 !x.gridstyle=2 … … 278 278 if keyword_set(reverse_x) then !x.range = [tempsmax,tempsmin]-tempsmin $ 279 279 ELSE !x.range=[tempsmin,tempsmax]-tempsmin 280 if vargrid EQ 'W' then gdep=gdepw[0:nzw-1] ELSE gdep=gdept[0:nzt-1] 281 !x.tickname = LABEL_DATE(0, 0,ticknom,_EXTRA = ex) 280 if vargrid EQ 'W' then gdep=gdepw[0:nzw-1] ELSE gdep=gdept[0:nzt-1] 281 !x.tickname = LABEL_DATE(0, 0,ticknom,_EXTRA = ex) 282 282 !x.ticklen=1. 283 283 !x.gridstyle=2 … … 291 291 if keyword_set(reverse_x) then !x.range = [tempsmax,tempsmin]-tempsmin $ 292 292 ELSE !x.range=[tempsmin,tempsmax]-tempsmin 293 !x.tickname = LABEL_DATE(0, 0,ticknom,_EXTRA = ex) 293 !x.tickname = LABEL_DATE(0, 0,ticknom,_EXTRA = ex) 294 294 !x.ticklen=1. 295 295 !x.gridstyle=2 … … 308 308 ; Number of ticks by default 309 309 plot, [0], [0], /nodata, /noerase, xstyle = 5, ystyle = 5, xtick_get = xaxe 310 ; We increase this number to it be around 10 310 ; We increase this number to it be around 10 311 311 ticks = n_elements(xaxe)-1 312 312 ticks = ticks*[1, 2, 4, 8] … … 324 324 END 325 325 'z' : begin 326 ; if vargrid EQ 'W' then gdep=gdepw[0:nzw-1] ELSE gdep=gdept[0:nzt-1] 326 ; if vargrid EQ 'W' then gdep=gdepw[0:nzw-1] ELSE gdep=gdept[0:nzt-1] 327 327 ; if keyword_set(reverse_y) then !y.range=[gdep[0], gdep[n_elements(gdep)-1]] $ 328 328 ; ELSE !y.range=[gdep[n_elements(gdep)-1], gdep[0]] 329 END 329 END 330 330 endcase 331 if keyword_set(key_performance) THEN print, 'temps axe', systime(1)-tempsun 331 if keyword_set(key_performance) THEN print, 'temps axe', systime(1)-tempsun 332 332 return 333 333 end
Note: See TracChangeset
for help on using the changeset viewer.