source: trunk/UTIL/PYTHON/planetoplot_v2/examples/reference/zonalmean.py @ 1050

Last change on this file since 1050 was 1050, checked in by aslmd, 11 years ago

UTIL PYTHON planetoplot_v2

RENAMED VARIABLES TO BE SIMPLER or COMPLIANT WITH MATPLOTLIB

colorb >> colorbar
lstyle >> linestyle
label >> legend

stridevecx >> svx
stridevecy >> svy
stridex >> sx
stridey >> sy
stridez >> sz
stridet >> st

(in ppplot only)
field >> f
absc >> x
ordi >> y
addvecx >> vx
addvecy >> vy
addontour >> c

ALSO added (same reason of compatibility)

  • the possibility to call ppplot.show() as in matplotlib
  • a shortcut method for a ppplot object: the so-called .makeshow()
  • Property svn:executable set to *
File size: 1.1 KB
Line 
1#! /usr/bin/env python
2from ppclass import pp
3
4## AVERAGED PROFILE
5temp = pp()
6temp.file = "/home/aymeric/Big_Data/DATAPLOT/diagfired.nc"
7temp.var = "temp"
8temp.x = "-180,175"
9temp.y = "-90,90"
10temp.t = "0,1"
11temp.get()
12temp.defineplot()
13temp.p[0].title = "This is an averaged temperature profile"
14temp.makeplot()
15
16## ZONAL MEAN
17u = pp()
18u.file = "/home/aymeric/Big_Data/DATAPLOT/diagfired.nc"
19u.var = "u"
20u.x = "-180,175"
21u.y = None
22u.t = "0.5"
23u.filename = "zonalmean"
24u.get()
25u.defineplot()
26u.p[0].div = 30.
27u.p[0].colorbar = "RdBu_r"
28u.p[0].title = "This is a zonal mean"
29u.makeplot()
30
31## ZONAL MINIMUM
32u.compute = "min"
33u.filename = "zonalmin"
34u.get()
35u.defineplot()
36u.p[0].div = 30.
37u.p[0].colorbar = "cool"
38u.p[0].title = "This is minimum over zonal axis"
39u.makeplot()
40
41## ZONAL MAXIMUM
42u.compute = "max"
43u.filename = "myplot"
44u.get()
45u.defineplot()
46u.p[0].div = 30.
47u.p[0].colorbar = "hot"
48u.p[0].title = "This is maximum over zonal axis"
49u.makeplot()
50
51## MAP OF MAXIMUM OVER TIME
52u.compute = "max"
53u.x = None
54u.y = None
55u.t = "0,1"
56u.z = 20000.
57u.get()
58u.defineplot()
59u.p[0].div = 30.
60u.p[0].title = "This is maximum over time"
61u.makeplot()
Note: See TracBrowser for help on using the repository browser.