Changeset 231 for trunk/SRC/ToBeReviewed/PLOTS/DIVERS/autoscale.pro
- Timestamp:
- 03/19/07 18:15:51 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/autoscale.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 ; @file_comments 7 ; We give a min and a max, and the procedure send back 3 ; @file_comments 4 ; We give a min and a max, and the procedure send back 8 5 ; the good contour interval and labels's value. 9 6 ; 10 ; @categories 7 ; @categories 11 8 ; Graphics 12 9 ; … … 31 28 ; 32 29 ;- 33 ;------------------------------------------------------------ 34 ;------------------------------------------------------------ 35 ;------------------------------------------------------------ 30 ; 36 31 PRO autoscale, min, max, ci 37 32 ; … … 53 48 ; until the number of contour is inferior to 30. 54 49 ; 55 WHILE ceil((max-min)/ci) GE 30 DO BEGIN 50 WHILE ceil((max-min)/ci) GE 30 DO BEGIN 56 51 ci = ci0*coef[n] 57 52 n = n+1 58 ENDWHILE 53 ENDWHILE 59 54 60 55 min = floor(min/ci/2)*ci*2 61 56 max = ceil(max/ci/2)*ci*2 62 63 nlevels = round((max-min)/ci) 57 58 nlevels = round((max-min)/ci) 64 59 65 60 ; 66 61 ; We force the number of contour to be even 67 62 ; 68 IF nlevels MOD 2 EQ 1 THEN BEGIN 63 IF nlevels MOD 2 EQ 1 THEN BEGIN 69 64 nlevels = nlevels+1 70 65 max = max+ci 71 END 72 73 74 END 75 76 77 78 66 END 67 END
Note: See TracChangeset
for help on using the changeset viewer.