Changeset 181 for trunk/MESOSCALE/PLOT/PYTHON/mylib
- Timestamp:
- Jun 29, 2011, 7:00:20 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MESOSCALE/PLOT/PYTHON/mylib/myplot.py
r180 r181 47 47 import matplotlib.pyplot as plt 48 48 res = int(res) 49 if folder != '': 50 else: name = filename+str(res)+".png"49 if folder != '': name = folder+'/'+filename+str(res)+".png" 50 else: name = filename+str(res)+".png" 51 51 plt.savefig(name,dpi=res,bbox_inches='tight',pad_inches=pad_inches_value) 52 if disp: 52 if disp: display(name) 53 53 return 54 54 … … 118 118 def display (name): 119 119 from os import system 120 system(" eog"+name+" > /dev/null 2> /dev/null &")120 system("display "+name+" > /dev/null 2> /dev/null &") 121 121 return name 122 122 … … 138 138 meanlat = 0.5*(wlat[0]+wlat[1]) 139 139 h = 2000. 140 if char == "cyl": m = Basemap(projection='cyl',llcrnrlat=wlat[0],urcrnrlat=wlat[1],llcrnrlon=wlon[0],urcrnrlon=wlon[1]) #,suppress_ticks=False)140 if char == "cyl": m = Basemap(projection='cyl',llcrnrlat=wlat[0],urcrnrlat=wlat[1],llcrnrlon=wlon[0],urcrnrlon=wlon[1]) 141 141 elif char == "moll": m = Basemap(projection='moll',lon_0=meanlon) 142 142 elif char == "ortho": m = Basemap(projection='ortho',lon_0=meanlon,lat_0=meanlat)
Note: See TracChangeset
for help on using the changeset viewer.