Changeset 2118 in lmdz_wrf
- Timestamp:
- Aug 31, 2018, 12:23:06 AM (7 years ago)
- Location:
- trunk/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/drawing.py
r2117 r2118 2413 2413 'l': milisecond 2414 2414 [tfmt]; desired format 2415 [legvals]=[locleg]|[fontsize] :2415 [legvals]=[locleg]|[fontsize]|[Ncols] 2416 2416 [locleg]: location of the legend (0, autmoatic) 2417 2417 1: 'upper right', 2: 'upper left', 3: 'lower left', 4: 'lower right', … … 2419 2419 9: 'upper center', 10: 'center' 2420 2420 [fontsize]: font size for the legend (auto for 12) 2421 [Ncols]: number of columns in the legend 2421 2422 [graphk]: kind of the output of the graphic ('png', 'pdf', 'eps', ...) 2422 2423 [lines]: ',' list of type of lines (matplotlib syntax), 'None' for automatic, … … 2560 2561 2561 2562 # Legend 2562 locleg, legfontsize = drw.legend_values(legvals,'|')2563 legconf = [locleg, legfontsize ]2563 locleg, legfontsize, Ncols = drw.legend_values(legvals,'|') 2564 legconf = [locleg, legfontsize, Ncols] 2564 2565 2565 2566 # Getting values -
trunk/tools/drawing_tools.py
r2105 r2118 6521 6521 vmin= minimum value for the axis-value 'auto' for use the extreme 6522 6522 vmax= maximum value for the axis-value 'auto' for use the extreme 6523 legv = [gloc, gsize ] legend values6523 legv = [gloc, gsize, Ncol] legend values 6524 6524 gloc= location of the legend (0, autmoatic) 6525 6525 1: 'upper right', 2: 'upper left', 3: 'lower left', 4: 'lower right', … … 6527 6527 9: 'upper center', 10: 'center' 6528 6528 gsize= fontsize of the legend 6529 Ncol= number of columns 6529 6530 trng= actual range of time values [tmin, tmax] 6530 6531 kfig= kind of figure … … 6708 6709 plt.title(graphtit) 6709 6710 if linesn0 is not None: 6710 print 'Lluis: legv:', legv 6711 plt.legend(loc=legv[0], prop={'size':legv[1]}) 6711 plt.legend(loc=legv[0], prop={'size':legv[1]}, ncol=legv[2]) 6712 6712 6713 6713 output_kind(kfig, figname, ifclose)
Note: See TracChangeset
for help on using the changeset viewer.