- Timestamp:
- May 26, 2015, 3:46:27 PM (10 years ago)
- Location:
- trunk/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/drawing.py
r422 r440 2244 2244 draw_vals_trajectories(ncfile, values, variable) 2245 2245 ncfile= [ncfile] ',' list of files to use 2246 values= [statistics]:[Tint]:[labels]@[locleg]:[gvarname]:[timetit]:[tkind]:[timefmt]:[title]:[gkind] 2247 [statistics]: which statistics to use, from: 'center', 'min', 'max', 'mean', 2246 values= [statisticskind]:[Tint]:[labels]@[locleg]:[gvarname]:[timetit]:[tkind]:[timefmt]:[title]:[gkind] 2247 [statisticskind]=[statistics][kind] 2248 [statistics]: which statistics to use, from: 'center', 'min', 'max', 'mean', 2248 2249 'mean2', 'stdev' 2250 [kind]: 'box', 'circle' statistics taking the values from a box or a circle 2251 'trj': value following the trajectory 2249 2252 [Tint]: [Tbeg]@[Tend] or None, interval of time to plot or -1 for all the times 2250 2253 [labels]: ',' separated list of labels for the legend … … 2283 2286 quit(-1) 2284 2287 2285 statistics = values.split(':')[0]2288 statisticskind = values.split(':')[0] 2286 2289 Tint = values.split(':')[1] 2287 2290 labels = values.split(':')[2] … … 2318 2321 trjobj = NetCDFFile(trjfile, 'r') 2319 2322 otim = trjobj.variables['time'] 2320 if not trjobj.variables.has_key(statistics + 'box_' + variable):2323 if not trjobj.variables.has_key(statisticskind + '_' + variable): 2321 2324 print errormsg 2322 2325 print ' ' + fname + ": file '" + trjfile + "' does not have variable '"+\ 2323 statistics + 'box_' + variable + "' !!"2326 statisticskind + '_' + variable + "' !!" 2324 2327 quit(-1) 2325 ovar = trjobj.variables[statistics + 'box_' + variable]2328 ovar = trjobj.variables[statisticskind + '_' + variable] 2326 2329 dimt = otim.shape[0] 2327 2330 … … 2362 2365 2363 2366 drw.plot_TimeSeries(vartimetrjv, drw.units_lunits(gunits), tunits, \ 2364 'val_trajectories_' + statistics , gvarname, timetit, tkind, timefmt, title,\2367 'val_trajectories_' + statisticskind, gvarname, timetit, tkind, timefmt, title,\ 2365 2368 leglabels, locleg, gkind) 2366 2369 -
trunk/tools/drawing_tools.py
r422 r440 2318 2318 plt.xlabel(ttit) 2319 2319 plt.ylabel(vtit + " (" + vunits + ")") 2320 plt.title(tit ).replace('_','\_').replace('&','\&')2320 plt.title(tit.replace('_','\_').replace('&','\&')) 2321 2321 2322 2322 figname = hfileout + '_' + vtit
Note: See TracChangeset
for help on using the changeset viewer.