Changeset 562 in lmdz_wrf for trunk/tools
- Timestamp:
- Jul 6, 2015, 12:06:08 PM (10 years ago)
- Location:
- trunk/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/drawing.py
r561 r562 1803 1803 [valuesaxis]: which axis will be used for the values ('x', or 'y') 1804 1804 [dimtit]: title for the common dimension ('|' for spaces) 1805 [leglabels]: ',' separated list of names for the legend 1805 [leglabels]: ',' separated list of names for the legend ('None', no legend) 1806 1806 [vartit]: name of the variable in the graph 1807 1807 [title]: title of the plot ('|' for spaces) … … 2003 2003 timepos, timelabels = drw.CFtimes_plot(tvals, timeunit, timekind, timefmt) 2004 2004 2005 drw.plot_lines_time(dimvalues, varvalues, valuesaxis, dimtit, leglabels.split(','), \ 2006 vartit, varunits, timepos, timelabels, title, locleg, graphk, collines) 2007 2005 if leglabels.find(',') != -1: 2006 drw.plot_lines_time(dimvalues, varvalues, valuesaxis, dimtit, \ 2007 leglabels.split(','), vartit, varunits, timepos, timelabels, title, locleg, \ 2008 graphk, collines) 2009 else: 2010 drw.plot_lines_time(dimvalues, varvalues, valuesaxis, dimtit, \ 2011 None, vartit, varunits, timepos, timelabels, title, locleg, graphk, collines) 2008 2012 return 2009 2013 -
trunk/tools/drawing_tools.py
r560 r562 1445 1445 1446 1446 # Units which does not change 1447 same = ['1', 'category', 'day', 'deg', 'degrees East', 'degrees Nord',\1447 same = ['1', 'category', 'day', 'deg', 'degrees', 'degrees East', 'degrees Nord',\ 1448 1448 'degrees North', 'g', 'gpm', 'hour', 'hPa', 'K', 'Km', 'kg', 'km', 'm', \ 1449 1449 'minute', 'mm', 'month', 'Pa', 's', 'second', 'um', 'year', '-'] … … 5194 5194 return 5195 5195 5196 def plot_lines_time(vardv, varvv, vaxis, dtit, linesn , vtit, vunit, tpos, tlabs,\5196 def plot_lines_time(vardv, varvv, vaxis, dtit, linesn0, vtit, vunit, tpos, tlabs, \ 5197 5197 gtit, gloc, kfig, coll): 5198 5198 """ Function to plot a collection of lines with a time axis … … 5201 5201 vaxis= which axis will be used for the time values ('x', or 'y') 5202 5202 dtit= title for the common dimension 5203 linesn= names for the legend 5203 linesn= names for the legend (None, no legend) 5204 5204 vtit= title for the vaxis 5205 5205 vunit= units of the vaxis … … 5234 5234 xtrmdv = [fillValueF,-fillValueF] 5235 5235 5236 # Do we have legend? 5237 ## 5238 if linesn0 is None: 5239 linesn = [] 5240 for itrj in range(Ntraj): 5241 linesn = str(itrj) 5242 else: 5243 linesn = linesn0 5244 5236 5245 if vaxis == 'x': 5237 5246 for il in range(Ntraj): … … 5296 5305 5297 5306 plt.title(graphtit) 5298 plt.legend(loc=gloc) 5307 if linesn0 is not None: 5308 plt.legend(loc=gloc) 5299 5309 5300 5310 print plt.xlim(),':', plt.ylim()
Note: See TracChangeset
for help on using the changeset viewer.