Changeset 948 in lmdz_wrf for trunk/tools
- Timestamp:
- Jun 24, 2016, 1:39:50 PM (8 years ago)
- Location:
- trunk/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/drawing.py
r947 r948 1799 1799 'l': milisecond 1800 1800 [tfmt]; desired format 1801 [locleg]: location of the legend (0, autmoatic) 1802 1: 'upper right', 2: 'upper left', 3: 'lower left', 4: 'lower right', 1803 5: 'right', 6: 'center left', 7: 'center right', 8: 'lower center', 1804 9: 'upper center', 10: 'center' 1801 [legvals]=[locleg]|[fontsize]: 1802 [locleg]: location of the legend (0, autmoatic) 1803 1: 'upper right', 2: 'upper left', 3: 'lower left', 4: 'lower right', 1804 5: 'right', 6: 'center left', 7: 'center right', 8: 'lower center', 1805 9: 'upper center', 10: 'center' 1806 [fontsize]: font size for the legend (auto for 12) 1805 1807 [graphk]: kind of the graphic 1806 1808 [lines]: ',' list of type of lines, None for automatic, single value all the same … … 1841 1843 title = values.split(';')[5].replace('|',' ') 1842 1844 timevals = values.split(';')[6] 1843 l ocleg = int(values.split(';')[7])1845 legvalues = values.split(';')[7] 1844 1846 graphk = values.split(';')[8] 1845 1847 lines0 = values.split(';')[9] … … 1926 1928 timekind = timevals.split('|')[2] 1927 1929 timefmt = timevals.split('|')[3] 1930 1931 locleg = int(legvalues.split('|')[0]) 1932 if legvalues.split('|')[1] == 'auto': 1933 legfontsize = 12 1934 else: 1935 legfontsize = int(legvalues.split('|')[1]) 1928 1936 1929 1937 # Getting values … … 2093 2101 2094 2102 drw.plot_lines_time(dimvalues, varvalues, valuesaxis, dimtit, legvals, vartit, \ 2095 varunits, timepos, timelabels, title, locleg, graphk, lines, collines, points,\2096 linewidths, pointsizes, pointfreq)2103 varunits, timepos, timelabels, title, locleg, legfontsize, graphk, lines, \ 2104 collines, points, linewidths, pointsizes, pointfreq) 2097 2105 2098 2106 return -
trunk/tools/drawing_tools.py
r947 r948 5731 5731 5732 5732 def plot_lines_time(vardv, varvv, vaxis, dtit, linesn0, vtit, vunit, tpos, tlabs, \ 5733 gtit, gloc, kfig, lsl, coll, ptl, lwidth, psize, ptf):5733 gtit, gloc, gsize, kfig, lsl, coll, ptl, lwidth, psize, ptf): 5734 5734 """ Function to plot a collection of lines with a time axis 5735 5735 vardv= list of set of dimension values … … 5747 5747 5: 'right', 6: 'center left', 7: 'center right', 8: 'lower center', 5748 5748 9: 'upper center', 10: 'center' 5749 gsize= fontsize of the legend 5749 5750 kfig= kind of figure 5750 5751 lsl= ',' list of line styles … … 5866 5867 if linesn0 is not None: 5867 5868 if Ntraj < 10: 5868 plt.legend(loc=gloc )5869 plt.legend(loc=gloc, prop={'size':gsize}) 5869 5870 elif 10 < Ntraj < 20: 5870 plt.legend(loc=gloc, prop={'size': 10})5871 plt.legend(loc=gloc, prop={'size':int(gsize*0.8)}) 5871 5872 else: 5872 plt.legend(loc=gloc, prop={'size': 8})5873 plt.legend(loc=gloc, prop={'size':int(gsize*0.6)}) 5873 5874 5874 5875 print plt.xlim(),':', plt.ylim()
Note: See TracChangeset
for help on using the changeset viewer.