Ignore:
Timestamp:
Jul 16, 2011, 1:06:45 AM (13 years ago)
Author:
aslmd
Message:

MESOSCALE: corrections petits bugs graphiques.

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  
    3535        return wlon,wlat
    3636
    37 #def landers (map)
    38 #    map.plot(blue_calf_lon,blue_calf_lat, 'gs')
    39 #    return
    40 
    4137def getlschar ( namefile ):
    4238    #### strangely enough this does not work for api or ncrcat results!
     
    256252    return m
    257253
     254#### test temporaire
     255def 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
    258273def fmtvar (whichvar="def"):
    259274    fmtvar    =     { \
     
    265280             "USTM":         "%.2f",\
    266281             "HFX":          "%.0f",\
     282             "ICETOT":       "%.1e",\
    267283                    }
    268284    if whichvar not in fmtvar:
     
    278294             "USTM":         "YlOrRd",\
    279295             "HFX":          "RdYlBu",\
     296             "ICETOT":       "YlGnBu",\
    280297                     }
    281298    if whichone not in whichcolorb:
     
    305322                "vis":          "http://maps.jpl.nasa.gov/pix/mar0kuu2.jpg",\
    306323                "vishires":     "http://dl.dropbox.com/u/11078310/MarsMap_2500x1250.jpg",\
     324                "geolocal":     "http://dl.dropbox.com/u/11078310/geolocal.jpg",\
    307325                "mola":         "http://www.lns.cornell.edu/~seb/celestia/mars-mola-2k.jpg",\
    308326                "molabw":       "http://dl.dropbox.com/u/11078310/MarsElevation_2500x1250.jpg",\
Note: See TracChangeset for help on using the changeset viewer.