Changeset 1514 in lmdz_wrf


Ignore:
Timestamp:
Apr 11, 2017, 12:01:51 AM (8 years ago)
Author:
lfita
Message:

In `draw_2lines_time':

Changing ';' character list in marks list
Fixing extreme values from `variables_values'
Fixing other mistakes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/drawing.py

    r1489 r1514  
    54775477       [widths]:[styles]:[sizemarks]:[marks]:[graphtitle]:[labelaxis]:[legvals]:[figname]:[figkind]:[close]
    54785478        [timevardim]: name of the common variable-dimension time
    5479         [varangeA]: ',' separated list of range (min,max) for A values ('None', automatic; 'Extrs' from values extremes)
    5480         [varangeB]: ',' separated list of range (min,max) for B values ('None', automatic; 'Extrs' from values extremes)
     5479        [varangeA]: ',' separated list of range (min,max) for A values ('None', automatic from 'variables_values'; 'Extrs' from values extremes)
     5480        [varangeB]: ',' separated list of range (min,max) for B values ('None', automatic from 'variables_values'; 'Extrs' from values extremes)
    54815481        [timeaxisfmt]=[tkind];[tfmt]: format of the ticks for the time axis:
    54825482           [kind]: kind of time to appear in the graph
     
    54925492        [widths]: ',' list with widths of the lines for the variables ('None', automatic)
    54935493        [styles]: ',' list with the styles of the lines ('None', automatic)
    5494         [sizemarks]: ',' list with the size of the markers of the lines ('None', automatic)
    5495         [marks]: ',' list with the markers of the lines ('None', automatic)
     5494        [sizemarks]: ',' list with the size of the markers of the lines ('None', for 2.,2.)
     5495        [marks]: ';' list with the markers of the lines ('None', automatic)
    54965496        [graphtitle]: title of the figure ('!' for spaces)
    54975497        [labelaxis]: label in the figure of the common axis ('!' for spaces)
     
    55175517    expectargs = '[timevardim]:[varangeA]:[varangeB]:[timeaxisfmt]:[timeaxis]:' +    \
    55185518     '[figvarns]:[colors]:[widths]:[styles]:[sizemarks]:[marks]:[graphtitle]:' +     \
    5519      '[labelaxis]:[lloc]:[figname]:[figkind]:[close]'
     5519     '[labelaxis]:[legvals]:[figname]:[figkind]:[close]'
    55205520 
    55215521    drw.check_arguments(fname,values,expectargs,':')
     
    55315531    styles = gen.str_list(values.split(':')[8],',')
    55325532    sizemarks = gen.str_list_k(values.split(':')[9],',','np.float')
    5533     marks = gen.str_list(values.split(':')[10],',')
     5533    marks = gen.str_list(values.split(':')[10],';')
    55345534    graphtitle = values.split(':')[11].replace('!',' ')
    55355535    labelaxis = values.split(':')[12].replace('!',' ')
     
    55775577        quit(-1)
    55785578
     5579    valsA = gen.variables_values(invarns[0])
    55795580    if gen.searchInlist(objvA.ncattrs(), 'units'):
    55805581        varunits.append(drw.units_lunits(objvA.getncattr('units')))
    55815582    else:
    5582         valsA = gen.variables_values(invarns[0])
    55835583        varunits.append(drw.units_lunits(valsA[5]))
    55845584    if varangeA0 == 'None':
     
    56175617    tunitsB = objtB.getncattr('units')
    56185618
     5619    valsB = gen.variables_values(invarns[1])
    56195620    if gen.searchInlist(objvB.ncattrs(), 'units'):
    56205621        varunits.append(drw.units_lunits(objvB.getncattr('units')))
    56215622    else:
    5622         valsB = gen.variables_values(invarns[1])
    56235623        varunits.append(drw.units_lunits(valsB[5]))
    56245624    if varangeB0 == 'None':
    56255625        varangeB = [valsB[2], valsB[3]]
    56265626    elif varangeB0 == 'Extrs':
    5627         varangeA = [np.min(varvalsA), np.max(varvalsA)]
     5627        varangeB = [np.min(varvalsB), np.max(varvalsB)]
    56285628    else:
    56295629        for iv in range(2): varangeB[iv] = np.float(varangeB0.split(',')[iv])
Note: See TracChangeset for help on using the changeset viewer.