Changeset 438 for trunk/UTIL/PYTHON/planetoplot.py
- Timestamp:
- Dec 1, 2011, 10:30:39 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/PYTHON/planetoplot.py
r436 r438 288 288 if var2 == 'HGT': zelevels = np.arange(-10000.,30000.,2000.) 289 289 if mapmode == 0: 290 if typefile in ['mesoideal']: what_I_plot = dumpbdy(what_I_plot,0,stag='W')290 #if typefile in ['mesoideal']: what_I_plot = dumpbdy(what_I_plot,0,stag='W') 291 291 itime=indextime 292 292 if len(what_I_plot.shape) is 3: itime=[0] … … 295 295 ### If we plot a 2-D field 296 296 if len(what_I_plot.shape) is 2: 297 #zelevels=[ -10.,-8.,-6.,-4.,-2.,0.,2.,4.,6.,8.,10.]297 #zelevels=[0.2,0.4,0.6,0.8,1.] 298 298 cs = contour(x,y,what_I_plot, zelevels, colors='k', linewidths = 1 ) #0.33 colors='w' )# , alpha=0.5) 299 299 #clabel(cs,zelevels,inline=3,fmt='%1.1f',fontsize=7) … … 310 310 yint=yintegral, alt=vert, anomaly=anomaly ) 311 311 what_I_plot = what_I_plot*mult 312 #if typefile in ['mesoideal']: what_I_plot = dumpbdy(what_I_plot,0,stag='W') 312 313 if not error: 313 314 fvar = varname … … 321 322 if zxmin is not None: mpl.pyplot.xlim(xmin=zxmin) 322 323 if zxmax is not None: mpl.pyplot.xlim(xmax=zxmax) 323 if zymin is not None: mpl.pyplot.ylim(ymin=zymin) 324 if zymin is not None: mpl.pyplot.ylim(ymin=zymin) 324 325 if zymax is not None: mpl.pyplot.ylim(ymax=zymax) 325 326 if invert_y: lima,limb = mpl.pyplot.ylim() ; mpl.pyplot.ylim(limb,lima) 326 327 if ylog: mpl.pyplot.semilogy() 328 327 329 if (fileref is not None) and (index_f is numplot-1): zevmin, zevmax = calculate_bounds(what_I_plot,vmin=minop,vmax=maxop) 328 330 else: zevmin, zevmax = calculate_bounds(what_I_plot,vmin=vmin,vmax=vmax) … … 348 350 else: what_I_plot_frame = bounds(what_I_plot_frame,zevmin,zevmax) 349 351 if flagnolow: what_I_plot_frame = nolow(what_I_plot_frame) 352 353 # Renew axis directives for movie frames which are not the first one. 354 if imov > 0: 355 zxmin, zxmax = xaxis ; zymin, zymax = yaxis 356 if zxmin is not None: mpl.pyplot.xlim(xmin=zxmin) 357 if zxmax is not None: mpl.pyplot.xlim(xmax=zxmax) 358 if zymin is not None: mpl.pyplot.ylim(ymin=zymin) 359 if zymax is not None: mpl.pyplot.ylim(ymax=zymax) 360 if invert_y: lima,limb = mpl.pyplot.ylim() ; mpl.pyplot.ylim(limb,lima) 361 if ylog: mpl.pyplot.semilogy() 362 363 350 364 if not tile: 351 365 #zelevels = np.linspace(zevmin*(1. + 1.e-7),zevmax*(1. - 1.e-7)) #,num=20) … … 362 376 colorbar( fraction=0.05,pad=0.03,format=daformat,\ 363 377 ticks=np.linspace(zevmin,zevmax,num=min([ticks/2+1,20])),extend='neither',spacing='proportional' ) 364 #mframe=mpl.pyplot.gci().to_rgba(mpl.pyplot.gci().get_array())365 #mframe=mpl.pyplot.imshow()366 #mframe=fig2data(mpl.pyplot.gcf())367 378 mframe=fig2img(mpl.pyplot.gcf()) 368 379 if ((mrate is not None) and (imov is 0)):
Note: See TracChangeset
for help on using the changeset viewer.