Changeset 444 for trunk/UTIL/PYTHON/myplot.py
- Timestamp:
- Dec 1, 2011, 3:58:28 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/PYTHON/myplot.py
r441 r444 376 376 377 377 ## Author: AS + AC 378 def dumpbdy (field,n,stag=None): 379 nx = len(field[0,:])-1 380 ny = len(field[:,0])-1 381 if stag == 'U': nx = nx-1 382 if stag == 'V': ny = ny-1 383 if stag == 'W': nx = nx+1 #special les case when we dump stag on W 378 def dumpbdy (field,n,stag=None,condition=False): 379 if condition: 380 nx = len(field[0,:])-1 381 ny = len(field[:,0])-1 382 if stag == 'U': nx = nx-1 383 if stag == 'V': ny = ny-1 384 if stag == 'W': nx = nx+1 #special les case when we dump stag on W 384 385 return field[n:ny-n,n:nx-n] 385 386 386 ## Author: AS 387 ## Author: AS + AC 387 388 def getcoorddef ( nc ): 388 389 import numpy as np … … 1040 1041 1041 1042 def call_contour(what_I_plot,error,x,y,m,lon,lat,vert,time,vertmode,ze_var2,indextime,indexlon,indexlat,indexvert,yintegral,mapmode,typefile,var2,ticks): 1042 from matplotlib.pyplot import contour, plot 1043 from matplotlib.pyplot import contour, plot, clabel 1043 1044 import numpy as np 1044 1045 #what_I_plot = what_I_plot*mult … … 1057 1058 ### If we plot a 2-D field 1058 1059 if len(what_I_plot.shape) is 2: 1059 #zelevels=[ 0.2,0.4,0.6,0.8,1.]1060 #zelevels=[1.] 1060 1061 if mapmode == 0:cs = contour(x,y,what_I_plot, zelevels, colors='k', linewidths = 1 ) #0.33 colors='w' )# , alpha=0.5) 1061 1062 elif mapmode == 1:cs = m.contour(x,y,what_I_plot, zelevels, colors='k', linewidths = 1 ) #0.33 colors='w' )# , alpha=0.5)
Note: See TracChangeset
for help on using the changeset viewer.