Changeset 1514 in lmdz_wrf
- Timestamp:
- Apr 11, 2017, 12:01:51 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/drawing.py
r1489 r1514 5477 5477 [widths]:[styles]:[sizemarks]:[marks]:[graphtitle]:[labelaxis]:[legvals]:[figname]:[figkind]:[close] 5478 5478 [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) 5481 5481 [timeaxisfmt]=[tkind];[tfmt]: format of the ticks for the time axis: 5482 5482 [kind]: kind of time to appear in the graph … … 5492 5492 [widths]: ',' list with widths of the lines for the variables ('None', automatic) 5493 5493 [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) 5496 5496 [graphtitle]: title of the figure ('!' for spaces) 5497 5497 [labelaxis]: label in the figure of the common axis ('!' for spaces) … … 5517 5517 expectargs = '[timevardim]:[varangeA]:[varangeB]:[timeaxisfmt]:[timeaxis]:' + \ 5518 5518 '[figvarns]:[colors]:[widths]:[styles]:[sizemarks]:[marks]:[graphtitle]:' + \ 5519 '[labelaxis]:[l loc]:[figname]:[figkind]:[close]'5519 '[labelaxis]:[legvals]:[figname]:[figkind]:[close]' 5520 5520 5521 5521 drw.check_arguments(fname,values,expectargs,':') … … 5531 5531 styles = gen.str_list(values.split(':')[8],',') 5532 5532 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],';') 5534 5534 graphtitle = values.split(':')[11].replace('!',' ') 5535 5535 labelaxis = values.split(':')[12].replace('!',' ') … … 5577 5577 quit(-1) 5578 5578 5579 valsA = gen.variables_values(invarns[0]) 5579 5580 if gen.searchInlist(objvA.ncattrs(), 'units'): 5580 5581 varunits.append(drw.units_lunits(objvA.getncattr('units'))) 5581 5582 else: 5582 valsA = gen.variables_values(invarns[0])5583 5583 varunits.append(drw.units_lunits(valsA[5])) 5584 5584 if varangeA0 == 'None': … … 5617 5617 tunitsB = objtB.getncattr('units') 5618 5618 5619 valsB = gen.variables_values(invarns[1]) 5619 5620 if gen.searchInlist(objvB.ncattrs(), 'units'): 5620 5621 varunits.append(drw.units_lunits(objvB.getncattr('units'))) 5621 5622 else: 5622 valsB = gen.variables_values(invarns[1])5623 5623 varunits.append(drw.units_lunits(valsB[5])) 5624 5624 if varangeB0 == 'None': 5625 5625 varangeB = [valsB[2], valsB[3]] 5626 5626 elif varangeB0 == 'Extrs': 5627 varange A = [np.min(varvalsA), np.max(varvalsA)]5627 varangeB = [np.min(varvalsB), np.max(varvalsB)] 5628 5628 else: 5629 5629 for iv in range(2): varangeB[iv] = np.float(varangeB0.split(',')[iv])
Note: See TracChangeset
for help on using the changeset viewer.