Ignore:
Timestamp:
08/10/06 09:01:35 (18 years ago)
Author:
smasson
Message:

introduce pltv.pro

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ToBeReviewed/PLOTS/DESSINE/tvplus.pro

    r142 r152  
    2424; are not coded for "scrolling window" case... 
    2525; 
    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} 
    3130; 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} 
    3533; The color number that should be used for the mask values. 
    36 ; default value is 0 
    3734; 
    3835; @keyword OFFSET  
     
    4744; abs(mask)/10. This is necessary to avoid the rounding errors 
    4845; 
    49 ; @keyword MIN  
    50 ; Scalar used to specify the min value of the color bar. default is 0 
     46; @keyword MIN 
     47; Scalar used to specify the min value to be drawn. 
    5148; 
    5249; @keyword MAX 
    53 ; Scalar used to specify the max value of the color bar. default is !d.n_colors < 255 
    54 ; 
    55 ; @keyword NCOLORS 
    56 ; This is the number of colors in the color bar. default is !d.n_colors<255 -1 
     50; 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. 
    5754; 
    5855; @keyword NOINTERP 
    5956; 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. 
    6158; This can be for example usefull when working on byte type arrays. 
    6259; 
     
    6865; default is window number 0. 
    6966; 
     67; @keyword _EXTRA 
     68; used to pass keywords to TV, PLOT, COLORBAR 
     69;  
    7070; @restrictions  
    7171; use your mouse to scan the array values... 
     
    112112;------------------------------------------------------------ 
    113113  ncolmax = !d.n_colors < 256 
    114   IF N_ELEMENTS(bottom) EQ 0 THEN bottom = 0 
    115   if NOT keyword_set(ncolors) then ncolors = ncolmax-bottom 
     114  IF N_ELEMENTS(bottom) EQ 0 THEN bottom = 1 
     115  if NOT keyword_set(ncolors) then ncolors = ncolmax - 1 - bottom 
    116116  topcol = (bottom+ncolors-1) < (ncolmax-1) 
    117117;------------------------------------------------------------ 
     
    177177    m = 1.*(ncolors-1)/(truemax-truemin) 
    178178    p = bottom-1.*truemin*m 
    179     arr = round(1.*m*arr+p)  
     179    arr = round(m*temporary(arr)+p)  
    180180  endif 
    181181; set c_nan for NaN values  
     
    188188    arr[masked] = c_mask < (ncolmax -1) 
    189189; use byte type to save memory 
    190   arr = byte(arr) 
     190  arr = byte(temporary(arr)) 
    191191; increase the size of the array in order to be displayed 
    192192; 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) 
    194195;------------------------------------------------------------ 
    195196; open a window with the correct size 
Note: See TracChangeset for help on using the changeset viewer.