Ignore:
Timestamp:
Jun 29, 2011, 7:00:20 PM (14 years ago)
Author:
aslmd
Message:

MESOSCALE:PYTHON: petites ameliorations pour rendre les scripts applicables si on n'a pas les droits dans le dossier ou se trouvent les donnees.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MESOSCALE/PLOT/PYTHON/mylib/myplot.py

    r180 r181  
    4747    import  matplotlib.pyplot as plt
    4848    res = int(res)
    49     if folder != '':    name = folder+'/'+filename+str(res)+".png"
    50     else:               name = filename+str(res)+".png"
     49    if folder != '':      name = folder+'/'+filename+str(res)+".png"
     50    else:                 name = filename+str(res)+".png"
    5151    plt.savefig(name,dpi=res,bbox_inches='tight',pad_inches=pad_inches_value)
    52     if disp:            display(name)           
     52    if disp:              display(name)         
    5353    return
    5454
     
    118118def display (name):
    119119        from    os                              import system
    120         system("eog "+name+" > /dev/null 2> /dev/null &")
     120        system("display "+name+" > /dev/null 2> /dev/null &")
    121121        return name
    122122
     
    138138    meanlat = 0.5*(wlat[0]+wlat[1])
    139139    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])
    141141    elif char == "moll":    m = Basemap(projection='moll',lon_0=meanlon)
    142142    elif char == "ortho":   m = Basemap(projection='ortho',lon_0=meanlon,lat_0=meanlat)
Note: See TracChangeset for help on using the changeset viewer.