- Timestamp:
- Mar 19, 2012, 10:23:14 AM (13 years ago)
- Location:
- trunk/UTIL/PYTHON
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/PYTHON/myplot.py
r583 r587 756 756 #print "NEW MIN ", min(what_I_plot) 757 757 what_I_plot[ what_I_plot > 9e+35 ] = -9e+35 758 what_I_plot[ what_I_plot > zevmax ] = zevmax 758 what_I_plot[ what_I_plot > zevmax ] = zevmax*(1. - 1.e-7) 759 759 #print "NEW MAX ", max(what_I_plot) 760 760 return what_I_plot -
trunk/UTIL/PYTHON/planetoplot.py
r582 r587 86 86 import subprocess 87 87 #from singlet import singlet 88 from itertools import cycle 88 89 89 90 ######################### … … 214 215 indices[iii,jjj,:] = bidimfind(lon2d,lat2d,vlon,vlat,file=iwantawhereplot) 215 216 lonp,latp = ( lon2d[indices[iii,jjj,0],indices[iii,jjj,1]] , lat2d[indices[iii,jjj,0],indices[iii,jjj,1]] ) 217 ### possible bug here if several --lat 216 218 for iii in range(numlon): 217 219 for jjj in range(numlat): … … 344 346 ### Time loop for plotting device 345 347 nplot = 1 ; error = False 348 linecycler = cycle(["-","--","-.",":"]) 346 349 print "********************************************" 347 350 while error is False: … … 423 426 if mapmode == 0: ### could this be moved inside imov loop ? 424 427 itime=indextime 425 if len(what_I_plot.shape) is3: itime=[0]428 if len(what_I_plot.shape) == 3: itime=[0] 426 429 m = None ; x = None ; y = None 427 430 what_I_plot, x, y = define_axis(lon,lat,vert,time,indexlon,indexlat,indexvert,\ … … 491 494 if mrate is not None: x = y ## because swapaxes... 492 495 #what_I_plot_frame = np.diff(what_I_plot_frame, n=1) ; x = x[1:] 493 494 if not tile: zeline='-' 495 else: zeline=',' 496 497 zeline = next(linecycler) ## "-" for simple lines 498 if tile: zemarker = 'x' 499 else: zemarker = None 496 500 this_is_a_regular_plot = (indexvert is not None) or (indextime is None) or (indexlat is None) or (indexlon is None) 497 if this_is_a_regular_plot: plot(x,what_I_plot_frame,zeline,label=lbl ) ## vertical profile498 else: plot(what_I_plot_frame,x,zeline,label=lbl ) ## regular plot501 if this_is_a_regular_plot: plot(x,what_I_plot_frame,zeline,label=lbl,marker=zemarker) ## vertical profile 502 else: plot(what_I_plot_frame,x,zeline,label=lbl,marker=zemarker) ## regular plot 499 503 if nplot > 1: legend(loc='best') 500 504 if indextime is None and axtime is not None and xlab is None: xlabel(axtime.upper()) ## define the right label
Note: See TracChangeset
for help on using the changeset viewer.