Changeset 232 for trunk/MESOSCALE_DEV/PLOT/PYTHON/mylib
- Timestamp:
- Jul 16, 2011, 1:06:45 AM (13 years ago)
- Location:
- trunk/MESOSCALE_DEV/PLOT/PYTHON/mylib
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MESOSCALE_DEV/PLOT/PYTHON/mylib/myplot.py
r228 r232 35 35 return wlon,wlat 36 36 37 #def landers (map)38 # map.plot(blue_calf_lon,blue_calf_lat, 'gs')39 # return40 41 37 def getlschar ( namefile ): 42 38 #### strangely enough this does not work for api or ncrcat results! … … 256 252 return m 257 253 254 #### test temporaire 255 def putpoints (map,plot): 256 #### from http://www.scipy.org/Cookbook/Matplotlib/Maps 257 # lat/lon coordinates of five cities. 258 lats = [18.4] 259 lons = [-134.0] 260 points=['Olympus Mons'] 261 # compute the native map projection coordinates for cities. 262 x,y = map(lons,lats) 263 # plot filled circles at the locations of the cities. 264 map.plot(x,y,'bo') 265 # plot the names of those five cities. 266 wherept = 0 #1000 #50000 267 for name,xpt,ypt in zip(points,x,y): 268 plot.text(xpt+wherept,ypt+wherept,name) 269 ## le nom ne s'affiche pas... 270 return 271 272 258 273 def fmtvar (whichvar="def"): 259 274 fmtvar = { \ … … 265 280 "USTM": "%.2f",\ 266 281 "HFX": "%.0f",\ 282 "ICETOT": "%.1e",\ 267 283 } 268 284 if whichvar not in fmtvar: … … 278 294 "USTM": "YlOrRd",\ 279 295 "HFX": "RdYlBu",\ 296 "ICETOT": "YlGnBu",\ 280 297 } 281 298 if whichone not in whichcolorb: … … 305 322 "vis": "http://maps.jpl.nasa.gov/pix/mar0kuu2.jpg",\ 306 323 "vishires": "http://dl.dropbox.com/u/11078310/MarsMap_2500x1250.jpg",\ 324 "geolocal": "http://dl.dropbox.com/u/11078310/geolocal.jpg",\ 307 325 "mola": "http://www.lns.cornell.edu/~seb/celestia/mars-mola-2k.jpg",\ 308 326 "molabw": "http://dl.dropbox.com/u/11078310/MarsElevation_2500x1250.jpg",\
Note: See TracChangeset
for help on using the changeset viewer.