Changeset 1062 for trunk/UTIL


Ignore:
Timestamp:
Oct 11, 2013, 3:38:41 AM (11 years ago)
Author:
aslmd
Message:

planetoplot_v2. added trans back showcb attributes to ppclass. simplified example scripts. added the web home page example.

Location:
trunk/UTIL/PYTHON/planetoplot_v2
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTIL/PYTHON/planetoplot_v2/examples/ppclass_reference/anomaly.py

    r1029 r1062  
    1818anomaly = ((simple-mean)/mean)*100.
    1919anomaly.filename = "anomaly"
    20 anomaly.defineplot()
    21 anomaly.p[0].title = "surface temperature anomaly"
    22 anomaly.p[0].units = '%'
    23 anomaly.makeplot()
     20anomaly.title = "surface temperature anomaly"
     21anomaly.units = '%'
     22anomaly.plot()
  • trunk/UTIL/PYTHON/planetoplot_v2/examples/ppclass_reference/les_psfc.py

    r1029 r1062  
    1717#les.stridey = 3
    1818les.filename = "les_psfc"
     19
    1920les.getplot()
     21
     22
  • trunk/UTIL/PYTHON/planetoplot_v2/examples/ppclass_reference/simple.py

    r1050 r1062  
    1919# we define the plot, then set a few personal stuff
    2020u.defineplot()
    21 u.p[0].title = "This is what we name $u$"
    22 u.p[0].proj = "robin"
     21u.title = "This is what we name $u$"
     22u.proj = "robin"
    2323u.filename = "simple"
    2424
     
    2828# we simply change the colorbar
    2929# ... no need to reload data
    30 u.p[0].colorbar = "RdBu"
     30u.colorbar = "RdBu"
    3131u.filename = "myplot"
    3232u.makeplot()
  • trunk/UTIL/PYTHON/planetoplot_v2/examples/ppclass_reference/tide.py

    r1050 r1062  
    1111waveref.title = "$p_s$ diurnal anomaly"
    1212waveref.proj = "moll"
     13
    1314waveref.vmin = -10
    1415waveref.vmax = 10
  • trunk/UTIL/PYTHON/planetoplot_v2/examples/ppclass_reference/vector.py

    r1050 r1062  
    2424u.getplot()
    2525
    26 
    27 
    2826u.z = "50"
    2927u.filename = "myplot"
    3028u.getplot()
    3129
    32 
    33 u.p[0].colorbar = "jet"
    34 u.p[0].trans = 0.0
    35 u.p[0].back = "vis"
     30u.colorbar = "jet"
     31u.trans = 0.0
     32u.back = "vis"
    3633
    3734u.makeplot()
  • trunk/UTIL/PYTHON/planetoplot_v2/examples/ppclass_reference/zonalcontour.py

    r1050 r1062  
    1111u.get()
    1212u.defineplot()
    13 u.p[0].div = 30.
    14 u.p[0].colorbar = "spectral"
     13u.div = 30.
     14u.colorbar = "spectral"
    1515u.makeplot()
    16 
    1716
    1817u.var = ["u","u"]
     
    2019u.get()
    2120u.defineplot()
    22 u.p[0].div = 30.
     21u.div = 30.
    2322u.makeplot()
  • trunk/UTIL/PYTHON/planetoplot_v2/examples/ppclass_reference/zonalmean.py

    r1050 r1062  
    1111temp.get()
    1212temp.defineplot()
    13 temp.p[0].title = "This is an averaged temperature profile"
     13temp.title = "This is an averaged temperature profile"
    1414temp.makeplot()
    1515
     
    2424u.get()
    2525u.defineplot()
    26 u.p[0].div = 30.
    27 u.p[0].colorbar = "RdBu_r"
    28 u.p[0].title = "This is a zonal mean"
     26u.div = 30.
     27u.colorbar = "RdBu_r"
     28u.title = "This is a zonal mean"
    2929u.makeplot()
    3030
     
    3434u.get()
    3535u.defineplot()
    36 u.p[0].div = 30.
    37 u.p[0].colorbar = "cool"
    38 u.p[0].title = "This is minimum over zonal axis"
     36u.div = 30.
     37u.colorbar = "cool"
     38u.title = "This is minimum over zonal axis"
    3939u.makeplot()
    4040
     
    4444u.get()
    4545u.defineplot()
    46 u.p[0].div = 30.
    47 u.p[0].colorbar = "hot"
    48 u.p[0].title = "This is maximum over zonal axis"
     46u.div = 30.
     47u.colorbar = "hot"
     48u.title = "This is maximum over zonal axis"
    4949u.makeplot()
    5050
     
    5757u.get()
    5858u.defineplot()
    59 u.p[0].div = 30.
    60 u.p[0].title = "This is maximum over time"
     59u.div = 30.
     60u.title = "This is maximum over time"
     61
     62u.out = "png"
     63
    6164u.makeplot()
  • trunk/UTIL/PYTHON/planetoplot_v2/examples/ppplot/plot_sounding.py

    r1051 r1062  
    2525sdg.makeshow()
    2626
     27sdg.make()
     28ppplot.save(mode="png",filename="plot",res=50,includedate=False)
    2729
     30
  • trunk/UTIL/PYTHON/planetoplot_v2/ppclass.py

    r1054 r1062  
    173173                      xp=16,yp=8,\
    174174                      missing=1.e25,\
     175                      trans=None,back=None,\
     176                      showcb=None,\
    175177                      title=None):
    176178        self.request = None
     
    231233        self.nxticks = nxticks ; self.nyticks = nyticks
    232234        self.fmt = fmt
     235        self.trans = trans ; self.back = back
     236        self.showcb = showcb
    233237
    234238    # print status
     
    291295            self.nxticks = other.nxticks ; self.nyticks = other.nyticks
    292296            self.fmt = other.fmt
     297            self.trans = other.trans ; self.back = other.back
     298            self.showcb = other.showcb
    293299        else:
    294300            print "!! ERROR !! argument must be a pp object." ; exit()
     
    835841                    if self.nyticks is not None: plobj.nyticks = self.nyticks
    836842                    if self.fmt is not None: plobj.fmt = self.fmt
     843                    if self.showcb is not None: plobj.showcb = self.showcb
    837844                    # -- 1D specific
    838845                    if dp == 1:
     
    846853                        if self.vmin is not None: plobj.vmin = self.vmin
    847854                        if self.vmax is not None: plobj.vmax = self.vmax
     855                        if self.trans is not None: plobj.trans = self.trans
     856                        if self.back is not None: plobj.back = self.back
    848857                        plobj.svx = self.svx
    849858                        plobj.svy = self.svy
  • trunk/UTIL/PYTHON/planetoplot_v2/ppplot.py

    r1054 r1062  
    4444ccol = 'black'
    4545cline = 0.55
     46cline = 0.8
    4647# (vectors)
    4748widthvec = 0.002
     
    746747                wlat[0] = None ; wlat[1] = None ; wlon[0] = None ; wlon[1] = None
    747748                steplon = 30. ; steplat = 30.
    748                 if self.proj in ["robin","moll"]: steplon = 60.
     749                if self.proj in ["moll"]: steplon = 60.
     750                if self.proj in ["robin"]: steplon = 90.
    749751                mertab = np.r_[-360.:360.:steplon]
    750752                partab = np.r_[-90.:90.:steplat]
     
    816818                            zelevelsc, colors = ccol, linewidths = cline)
    817819                #mpl.clabel(objC2, inline=1, fontsize=10,manual=True,fmt='-%2.0f$^{\circ}$C',colors='r')
    818             m.contourf(x, y, what_I_plot, zelevels, cmap = palette, alpha = self.trans)
     820            m.contourf(x, y, what_I_plot, zelevels, cmap = palette, alpha = self.trans, antialiased=True)
    819821        ############################################################################################
    820822        ### COLORBAR
Note: See TracChangeset for help on using the changeset viewer.