Changeset 1062 for trunk/UTIL/PYTHON
- Timestamp:
- Oct 11, 2013, 3:38:41 AM (11 years ago)
- 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 18 18 anomaly = ((simple-mean)/mean)*100. 19 19 anomaly.filename = "anomaly" 20 anomaly.defineplot() 21 anomaly.p[0].title = "surface temperature anomaly" 22 anomaly.p[0].units = '%' 23 anomaly.makeplot() 20 anomaly.title = "surface temperature anomaly" 21 anomaly.units = '%' 22 anomaly.plot() -
trunk/UTIL/PYTHON/planetoplot_v2/examples/ppclass_reference/les_psfc.py
r1029 r1062 17 17 #les.stridey = 3 18 18 les.filename = "les_psfc" 19 19 20 les.getplot() 21 22 -
trunk/UTIL/PYTHON/planetoplot_v2/examples/ppclass_reference/simple.py
r1050 r1062 19 19 # we define the plot, then set a few personal stuff 20 20 u.defineplot() 21 u. p[0].title = "This is what we name $u$"22 u.p [0].proj = "robin"21 u.title = "This is what we name $u$" 22 u.proj = "robin" 23 23 u.filename = "simple" 24 24 … … 28 28 # we simply change the colorbar 29 29 # ... no need to reload data 30 u. p[0].colorbar = "RdBu"30 u.colorbar = "RdBu" 31 31 u.filename = "myplot" 32 32 u.makeplot() -
trunk/UTIL/PYTHON/planetoplot_v2/examples/ppclass_reference/tide.py
r1050 r1062 11 11 waveref.title = "$p_s$ diurnal anomaly" 12 12 waveref.proj = "moll" 13 13 14 waveref.vmin = -10 14 15 waveref.vmax = 10 -
trunk/UTIL/PYTHON/planetoplot_v2/examples/ppclass_reference/vector.py
r1050 r1062 24 24 u.getplot() 25 25 26 27 28 26 u.z = "50" 29 27 u.filename = "myplot" 30 28 u.getplot() 31 29 32 33 u.p[0].colorbar = "jet" 34 u.p[0].trans = 0.0 35 u.p[0].back = "vis" 30 u.colorbar = "jet" 31 u.trans = 0.0 32 u.back = "vis" 36 33 37 34 u.makeplot() -
trunk/UTIL/PYTHON/planetoplot_v2/examples/ppclass_reference/zonalcontour.py
r1050 r1062 11 11 u.get() 12 12 u.defineplot() 13 u. p[0].div = 30.14 u. p[0].colorbar = "spectral"13 u.div = 30. 14 u.colorbar = "spectral" 15 15 u.makeplot() 16 17 16 18 17 u.var = ["u","u"] … … 20 19 u.get() 21 20 u.defineplot() 22 u. p[0].div = 30.21 u.div = 30. 23 22 u.makeplot() -
trunk/UTIL/PYTHON/planetoplot_v2/examples/ppclass_reference/zonalmean.py
r1050 r1062 11 11 temp.get() 12 12 temp.defineplot() 13 temp. p[0].title = "This is an averaged temperature profile"13 temp.title = "This is an averaged temperature profile" 14 14 temp.makeplot() 15 15 … … 24 24 u.get() 25 25 u.defineplot() 26 u. p[0].div = 30.27 u. p[0].colorbar = "RdBu_r"28 u. p[0].title = "This is a zonal mean"26 u.div = 30. 27 u.colorbar = "RdBu_r" 28 u.title = "This is a zonal mean" 29 29 u.makeplot() 30 30 … … 34 34 u.get() 35 35 u.defineplot() 36 u. p[0].div = 30.37 u. p[0].colorbar = "cool"38 u. p[0].title = "This is minimum over zonal axis"36 u.div = 30. 37 u.colorbar = "cool" 38 u.title = "This is minimum over zonal axis" 39 39 u.makeplot() 40 40 … … 44 44 u.get() 45 45 u.defineplot() 46 u. p[0].div = 30.47 u. p[0].colorbar = "hot"48 u. p[0].title = "This is maximum over zonal axis"46 u.div = 30. 47 u.colorbar = "hot" 48 u.title = "This is maximum over zonal axis" 49 49 u.makeplot() 50 50 … … 57 57 u.get() 58 58 u.defineplot() 59 u.p[0].div = 30. 60 u.p[0].title = "This is maximum over time" 59 u.div = 30. 60 u.title = "This is maximum over time" 61 62 u.out = "png" 63 61 64 u.makeplot() -
trunk/UTIL/PYTHON/planetoplot_v2/examples/ppplot/plot_sounding.py
r1051 r1062 25 25 sdg.makeshow() 26 26 27 sdg.make() 28 ppplot.save(mode="png",filename="plot",res=50,includedate=False) 27 29 30 -
trunk/UTIL/PYTHON/planetoplot_v2/ppclass.py
r1054 r1062 173 173 xp=16,yp=8,\ 174 174 missing=1.e25,\ 175 trans=None,back=None,\ 176 showcb=None,\ 175 177 title=None): 176 178 self.request = None … … 231 233 self.nxticks = nxticks ; self.nyticks = nyticks 232 234 self.fmt = fmt 235 self.trans = trans ; self.back = back 236 self.showcb = showcb 233 237 234 238 # print status … … 291 295 self.nxticks = other.nxticks ; self.nyticks = other.nyticks 292 296 self.fmt = other.fmt 297 self.trans = other.trans ; self.back = other.back 298 self.showcb = other.showcb 293 299 else: 294 300 print "!! ERROR !! argument must be a pp object." ; exit() … … 835 841 if self.nyticks is not None: plobj.nyticks = self.nyticks 836 842 if self.fmt is not None: plobj.fmt = self.fmt 843 if self.showcb is not None: plobj.showcb = self.showcb 837 844 # -- 1D specific 838 845 if dp == 1: … … 846 853 if self.vmin is not None: plobj.vmin = self.vmin 847 854 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 848 857 plobj.svx = self.svx 849 858 plobj.svy = self.svy -
trunk/UTIL/PYTHON/planetoplot_v2/ppplot.py
r1054 r1062 44 44 ccol = 'black' 45 45 cline = 0.55 46 cline = 0.8 46 47 # (vectors) 47 48 widthvec = 0.002 … … 746 747 wlat[0] = None ; wlat[1] = None ; wlon[0] = None ; wlon[1] = None 747 748 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. 749 751 mertab = np.r_[-360.:360.:steplon] 750 752 partab = np.r_[-90.:90.:steplat] … … 816 818 zelevelsc, colors = ccol, linewidths = cline) 817 819 #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) 819 821 ############################################################################################ 820 822 ### COLORBAR
Note: See TracChangeset
for help on using the changeset viewer.