Changeset 152 for trunk/SRC/ToBeReviewed/PLOTS/DESSINE/tvplus.pro
- Timestamp:
- 08/10/06 09:01:35 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/tvplus.pro
r142 r152 24 24 ; are not coded for "scrolling window" case... 25 25 ; 26 ; @keyword BOTTOM 27 ; The lowest color index of the colors to be loaded in 28 ; the bar. default is 0. 29 ; 30 ; @keyword C_NAN 26 ; @keyword BOTTOM {default=1} 27 ; The lowest color index of the colors to be used 28 ; 29 ; @keyword C_NAN {default=!d.n_colors < 255} 31 30 ; The color number that should be used for the NaN values. 32 ; default value is !d.n_colors < 255 33 ; 34 ; @keyword C_MASK 31 ; 32 ; @keyword C_MASK {default=0} 35 33 ; The color number that should be used for the mask values. 36 ; default value is 037 34 ; 38 35 ; @keyword OFFSET … … 47 44 ; abs(mask)/10. This is necessary to avoid the rounding errors 48 45 ; 49 ; @keyword MIN 50 ; Scalar used to specify the min value of the color bar. default is 046 ; @keyword MIN 47 ; Scalar used to specify the min value to be drawn. 51 48 ; 52 49 ; @keyword MAX 53 ; Scalar used to specify the max value of the color bar. default is !d.n_colors < 25554 ; 55 ; @keyword NCOLORS 56 ; This is the number of colors in the color bar. default is !d.n_colors<255 -150 ; Scalar used to specify the max value to be drawn. 51 ; 52 ; @keyword NCOLORS {default=(d.n_colors < 256) - 1 - bottom} 53 ; number of colors to be used. 57 54 ; 58 55 ; @keyword NOINTERP 59 56 ; Used this keyword if you don't whant that the values 60 ; are interpolated between 0 (or min) and !d.n_colors < 255 (or max).57 ; are interpolated from BOTTOM using NCOLORS colors. 61 58 ; This can be for example usefull when working on byte type arrays. 62 59 ; … … 68 65 ; default is window number 0. 69 66 ; 67 ; @keyword _EXTRA 68 ; used to pass keywords to TV, PLOT, COLORBAR 69 ; 70 70 ; @restrictions 71 71 ; use your mouse to scan the array values... … … 112 112 ;------------------------------------------------------------ 113 113 ncolmax = !d.n_colors < 256 114 IF N_ELEMENTS(bottom) EQ 0 THEN bottom = 0115 if NOT keyword_set(ncolors) then ncolors = ncolmax -bottom114 IF N_ELEMENTS(bottom) EQ 0 THEN bottom = 1 115 if NOT keyword_set(ncolors) then ncolors = ncolmax - 1 - bottom 116 116 topcol = (bottom+ncolors-1) < (ncolmax-1) 117 117 ;------------------------------------------------------------ … … 177 177 m = 1.*(ncolors-1)/(truemax-truemin) 178 178 p = bottom-1.*truemin*m 179 arr = round( 1.*m*arr+p)179 arr = round(m*temporary(arr)+p) 180 180 endif 181 181 ; set c_nan for NaN values … … 188 188 arr[masked] = c_mask < (ncolmax -1) 189 189 ; use byte type to save memory 190 arr = byte( arr)190 arr = byte(temporary(arr)) 191 191 ; increase the size of the array in order to be displayed 192 192 ; with the suitable size 193 arr = congridseb(arr, (size(arr))[1]*cellsize, (size(arr))[2]*cellsize) 193 szarr = size(arr, /dimensions) 194 arr = congrid(temporary(arr), szarr[0]*cellsize, szarr[1]*cellsize) 194 195 ;------------------------------------------------------------ 195 196 ; open a window with the correct size
Note: See TracChangeset
for help on using the changeset viewer.