Changeset 1571 in lmdz_wrf


Ignore:
Timestamp:
May 12, 2017, 5:30:09 PM (8 years ago)
Author:
lfita
Message:

Making use of `gen.minmax_range' in 'draw_time_lag'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/drawing.py

    r1569 r1571  
    72977297        [futunits]: units of the future-label
    72987298        [prerangevals]: Range of the previous axis with the values (single 'None' for 'auto','auto')
    7299          [vmin],[vmax]: minimum and maximum values
    7300            'auto': the computed minimumm or maximum of the values 
     7299          [val1],[val2]: tacking the provided ',' separated list of desired [val1] and [val2]
     7300          'auto': automatically set up range using minv and maxv
     7301          'extremescentered': extremes automatically centered on zero by computing from data -absmax, absmax;
     7302            absmax=max(abs(minval),maxval)
     7303          'meancentered': extremes automatically centered on mean by computing from data minv+meanv, maxv-meanv;
     7304            meanv=(minval + maxval)/2.
    73017305        [futrangevals]: Range of the future axis with the values (single 'None' for 'auto','auto')
    7302          [vmin],[vmax]: minimum and maximum values
    7303            'auto': the computed minimumm or maximum of the values 
     7306          [val1],[val2]: tacking the provided ',' separated list of desired [val1] and [val2]
     7307          'auto': automatically set up range using minv and maxv
     7308          'extremescentered': extremes automatically centered on zero by computing from data -absmax, absmax;
     7309            absmax=max(abs(minval),maxval)
     7310          'meancentered': extremes automatically centered on mean by computing from data minv+meanv, maxv-meanv;
     7311            meanv=(minval + maxval)/2.
    73047312        [timevals]: [timen]|[units]|[kind]|[tfmt] time labels characteristics
    73057313          [timen]; name of the time variable
     
    74087416        ifile=0
    74097417        for fdv in prefutdv:
    7410             expectargs = '[prefilen];[predslice];[pretvarn];[prevarn]%[futfilen];' + \
    7411               '[futdslice];[futtvarn];[futvarn]'
     7418            expectargs = '[pre/fut]filen;[pre/fut]dslice;[pre/fut]tvarn;[pre/fut]varn'
    74127419            drw.check_arguments('filevalues: '+fname, fdv, expectargs,';')
    74137420           
     
    75137520
    75147521    # ranges
    7515     if prerangevals == 'None':
    7516         valmin = preminval
    7517         valmax = premaxval
    7518     else:
    7519         if prerangevals.split(',')[0] != 'auto':
    7520             valmin = np.float(prerangevals.split(',')[0])
    7521         else:
    7522             valmin = preminval
    7523         if prerangevals.split(',')[1] != 'auto':
    7524             valmax = np.float(prerangevals.split(',')[1])
    7525         else:
    7526             valmax = premaxval
    7527     prerng = [valmin, valmax]
    7528 
    7529     if futrangevals == 'None':
    7530         valmin = futminval
    7531         valmax = futmaxval
    7532     else:
    7533         if futrangevals.split(',')[0] != 'auto':
    7534             valmin = np.float(futrangevals.split(',')[0])
    7535         else:
    7536             valmin = futminval
    7537         if futrangevals.split(',')[1] != 'auto':
    7538             valmax = np.float(futrangevals.split(',')[1])
    7539         else:
    7540             valmax = futmaxval
    7541     futrng = [valmin, valmax]
     7522    prerng = gen.minmax_range(preminval, premaxval, prerangevals)
     7523    futrng = gen.minmax_range(futminval, futmaxval, futrangevals)
    75427524
    75437525    xstyl, xaxf, Nxax, xaxor, ystyl, yaxf, Nyax, yaxor = drw.format_axes(dimxyfmt,',')
Note: See TracChangeset for help on using the changeset viewer.