Changeset 509 for trunk/SRC/ToBeReviewed


Ignore:
Timestamp:
12/19/19 10:27:05 (5 years ago)
Author:
smasson
Message:

commit old minor bugfix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ToBeReviewed/PLOTS/DIVERS/placecolor.pro

    r495 r509  
    3939; 
    4040;- 
    41 PRO placecolor, pos, _EXTRA=ex 
     41PRO placecolor, pos, _EXTRA = ex 
    4242; 
    4343  compile_opt idl2, strictarrsubs 
    4444; 
    4545@cm_4ps 
    46    IF NOT keyword_set(key_forgetold) THEN BEGIN 
     46  IF NOT keyword_set(key_forgetold) THEN BEGIN 
    4747@updatenew 
    48    ENDIF 
     48  ENDIF 
    4949; 
    50    xsave = !x 
    51    ysave = !y 
    52    psave = !p 
     50  xsave = !x 
     51  ysave = !y 
     52  psave = !p 
    5353; 
    54    reinitplt, /z, /invert 
    55    pos=1.*pos 
    56    mipgsz = min(page_size, max = mapgsz) 
    57    if key_portrait eq 1 then begin 
    58       pos[0]=pos[0]/mipgsz 
    59       pos[1]=pos[1]/mapgsz 
    60       pos[2]=pos[2]/mipgsz 
    61       pos[3]=pos[3]/mapgsz 
    62    endif else begin 
    63       pos[0]=pos[0]/mapgsz 
    64       pos[1]=pos[1]/mipgsz 
    65       pos[2]=pos[2]/mapgsz 
    66       pos[3]=pos[3]/mipgsz 
    67    ENDELSE 
     54  reinitplt, /z, /invert 
     55  pos = 1.*pos 
     56  mipgsz = min(page_size, max = mapgsz) 
     57  if key_portrait eq 1 then begin 
     58    pos[0] = pos[0]/mipgsz 
     59    pos[1] = pos[1]/mapgsz 
     60    pos[2] = pos[2]/mipgsz 
     61    pos[3] = pos[3]/mapgsz 
     62  endif else begin 
     63    pos[0] = pos[0]/mapgsz 
     64    pos[1] = pos[1]/mipgsz 
     65    pos[2] = pos[2]/mapgsz 
     66    pos[3] = pos[3]/mipgsz 
     67  ENDELSE 
    6868; 
    69    def_myuniquetmpdir 
     69  def_myuniquetmpdir 
    7070; 
    71    IF lmgr(/demo) EQ 1 THEN BEGIN 
     71  IF lmgr(/demo) EQ 1 THEN BEGIN 
    7272; if we are in demo mode, we cannot save the parameters in a temporary file... 
    7373@cm_demomode_used 
    7474; 
    75       colnumb = colorbarparam.colnumb 
    76       clbinf = colorbarparam.clbinf 
    77       clbsup = colorbarparam.clbsup 
    78       clbdiv = colorbarparam.clbdiv 
     75    colnumb = colorbarparam.colnumb 
     76    clbinf = colorbarparam.clbinf 
     77    clbsup = colorbarparam.clbsup 
     78    clbdiv = colorbarparam.clbdiv 
    7979; 
    80    ENDIF ELSE BEGIN 
    81       file = myuniquetmpdir + '4colorbar.dat' 
    82       IF file_test(file) THEN BEGIN 
    83          restore, file 
    84          if size(ex, /type) EQ 8 then BEGIN 
    85             if (where(tag_names(ex) EQ 'MIN'))[0] NE -1 then clbinf = ex.MIN 
    86             if (where(tag_names(ex) EQ 'MAX'))[0] NE -1 then clbsup = ex.MAX 
    87             if (where(tag_names(ex) EQ 'DIVISIONS'))[0] NE -1 then clbdiv = ex.DIVISIONS 
    88          ENDIF 
     80  ENDIF ELSE BEGIN 
     81    file = myuniquetmpdir + '4colorbar.dat' 
     82    IF file_test(file) THEN BEGIN 
     83      restore, file 
     84      if size(ex, /type) EQ 8 then BEGIN 
     85        if (where(tag_names(ex) EQ 'MIN'))[0] NE -1 then clbinf = ex.MIN 
     86        if (where(tag_names(ex) EQ 'MAX'))[0] NE -1 then clbsup = ex.MAX 
     87        if (where(tag_names(ex) EQ 'DIVISIONS'))[0] NE -1 then clbdiv = ex.DIVISIONS 
     88      ENDIF 
     89    ENDIF 
    8990; 
    90          COLORBAR, COLOR = 0, DIVISIONS = clbdiv, DISCRET = colnumb $ 
    91           , cb_color = 0, POSITION = pos, MAX = clbsup $ 
    92           , MIN = clbinf, cb_charsize = !p.charsize $ 
    93           , _extra = ex 
    94       ENDIF 
    95    ENDELSE 
     91    COLORBAR, COLOR = 0, DIVISIONS = clbdiv, DISCRET = colnumb $ 
     92              , cb_color = 0, POSITION = pos, MAX = clbsup $ 
     93              , MIN = clbinf, cb_charsize = !p.charsize $ 
     94              , _extra = ex 
     95  ENDELSE 
    9696; 
    97    !x = xsave 
    98    !y = ysave 
    99    !p = psave 
     97  !x = xsave 
     98  !y = ysave 
     99  !p = psave 
    100100; 
    101    return 
     101  return 
    102102end 
Note: See TracChangeset for help on using the changeset viewer.