Changeset 326 for trunk


Ignore:
Timestamp:
12/13/07 13:55:52 (16 years ago)
Author:
smasson
Message:

bugfix with max values of strictfill keyword

Location:
trunk/SRC/ToBeReviewed/PLOTS/DESSINE
Files:
3 edited

Legend:

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

    r325 r326  
    147147; @keyword STRICTFILL 
    148148; Activate this keyword to that the filling of contours be 
    149 ; precisely done between the min and the max specified letting values inferior at the 
    150 ; specified min and values superior at the specified max in white. 
     149; precisely done between the min and the max specified. Values inferior/superior at the 
     150; specified min/max are not filled. Note that max values a considered 
     151; as missing values so cells containing one or more corners with 
     152; values above max will have no contours drawn through them.   
    151153; 
    152154; @keyword STYLE {default=style=0} 
     
    342344    IF NOT keyword_set(nofill) THEN z2d[where(masknan EQ 0)] = max 
    343345  ENDIF ELSE masknan = 1 
     346  IF keyword_set(strictfill) THEN BEGIN 
     347    tmp = z2d ge max 
     348    tmp = 1b - byte(extrapolate(tmp, tmp, 1, x_periodic = keyword_set(key_periodic)*(nx EQ jpi) )) 
     349    trifield = triangule(temporary(tmp)*mask, coinmonte = coinmontemask $ 
     350               , coindescend = coindescendmask, keep_cont = 0) 
     351    indicezoommask = (lindgen(jpi, jpj))[firstx:lastx, firsty:lasty] 
     352  ENDIF 
    344353; filling the mask values 
    345354; we fill only masknan or we fill mask*masknan? 
  • trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltt.pro

    r325 r326  
    150150; @keyword STRICTFILL 
    151151; Activate this keyword to that the filling of contours be 
    152 ; precisely done between the min and the max specified letting values inferior at the 
    153 ; specified min and values superior at the specified max in white. 
     152; precisely done between the min and the max specified. Values inferior/superior at the 
     153; specified min/max are not filled. Note that max values a considered 
     154; as missing values so cells containing one or more corners with 
     155; values above max will have no contours drawn through them.   
    154156; 
    155157; @keyword STYLE {default=style=0} 
     
    467469         IF NOT keyword_set(nofill) THEN z2d[where(masknan EQ 0)] = max 
    468470         mask = temporary(mask)*temporary(masknan) 
     471       ENDIF 
     472      usetri = 0 ; default definition 
     473      IF keyword_set(strictfill) THEN BEGIN 
     474        tmp = z2d ge max 
     475        tmp = 1b - byte(extrapolate(tmp, tmp, 1)) 
     476        key_save = key_periodic & key_periodic = 0 
     477        trifield = triangule(temporary(tmp)*mask, coinmonte = coinmontemaskaa $ 
     478                             , coindescend = coindescendmaskaa, keep_cont = 0) 
     479        key_periodic = key_save 
     480        usetri = 2 
    469481      ENDIF 
    470482      z2d = remplit(z2d,nite=2+keyword_set(nan), mask = mask, /basique, _extra=ex) 
    471483      if NOT keyword_set(strictfill) then z2d = min > z2d <  max 
    472       usetri = 0 ; default definition 
    473484      if keyword_set(nan) then BEGIN 
    474485        triangulation = triangule(mask, /basic, coinmonte = coinmontemask $ 
     
    482493                                     , coindescend = coindescendmask) 
    483494      ENDIF 
     495      IF NOT keyword_set(strictfill) THEN trifield = triangulation 
    484496;---------------------------------------------------------------------- 
    485497      pltbase, z2d, xx, yy, mask, xx, yy, level_z2d, colnumb, contour = contour, /noerase $ 
    486498       , c_linestyle=linestyle,c_labels=1-(indgen(n_elements(level_z2d)) MOD 2) $ 
    487        , trichamp = triangulation, trimsk = triangulation, overplot = overplot $ 
     499       , trichamp = trifield, trimsk = triangulation, overplot = overplot $ 
    488500       , c_thick=thick, performance = key_performance, nofill = nofill, usetri = usetri $ 
    489501       , coinmontemask=coinmontemask, coindescendmask=coindescendmask, _extra = ex 
  • trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltz.pro

    r325 r326  
    129129; @keyword STRICTFILL 
    130130; Activate this keyword to that the filling of contours be 
    131 ; precisely done between the min and the max specified letting values inferior at the 
    132 ; specified min and values superior at the specified max in white. 
     131; precisely done between the min and the max specified. Values inferior/superior at the 
     132; specified min/max are not filled. Note that max values a considered 
     133; as missing values so cells containing one or more corners with 
     134; values above max will have no contours drawn through them.   
    133135; 
    134136; @keyword STYLE {default=style=0} 
     
    305307    IF NOT keyword_set(nofill) THEN z2d[where(masknan EQ 0)] = max 
    306308  ENDIF ELSE masknan = 1 
     309  IF keyword_set(strictfill) THEN BEGIN 
     310    tmp = z2d ge max 
     311    tmp = 1b - byte(extrapolate(tmp, tmp, 1)) 
     312    key_save = key_periodic & key_periodic = 0 
     313    trifield = triangule(temporary(tmp)*mask, coinmonte = coinmontemask $ 
     314                         , coindescend = coindescendmask, keep_cont = 0) 
     315    key_periodic = key_save 
     316  ENDIF 
    307317  IF n_elements(fillxdir) EQ 0  THEN fillxdir = 1 
    308318  IF keyword_set(fillxdir) THEN BEGIN 
     
    335345;   if keyword_set(notri) then trifield = -1 $ 
    336346;   ELSE trifield = triangule(mask,/basic) 
    337   if (usetri GE 1 AND (vargrid EQ 'T' OR vargrid EQ 'W')) $ 
    338     OR (usetri EQ 2 AND (vargrid NE 'T' AND vargrid NE 'W')) THEN $ 
    339     trifield = triangule(mask, /basic) 
     347  if NOT keyword_set(strictfill) AND ((usetri GE 1 AND (vargrid EQ 'T' OR vargrid EQ 'W')) $ 
     348                                      OR (usetri EQ 2 AND (vargrid NE 'T' AND vargrid NE 'W'))) THEN $ 
     349                                         trifield = triangule(mask, /basic) 
    340350; 
    341351  IF NOT keyword_set(endpoints)  THEN BEGIN 
Note: See TracChangeset for help on using the changeset viewer.