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

Last change on this file since 990 was 923, checked in by aslmd, 12 years ago

UTIL PYTHON planetoplot_v2

PPCLASS AND PPPLOT

  • added global plot settings in pp() objects
  • self is returned for each method to allow e.g. one-line get + attribution
  • added labeling of 1D plots
  • fine-tuning of plot appearance (e.g. vector key)
  • corrected a problem with plotin (same object can be referred to all along)
  • fixed meanarea for 1D requests

PP.PY

  • no more -f for pp.py (files are simply given as arguments!)
  • added missing options to pp.py
  • nice informative header

PP_RELOAD.PY

  • pp_reload.py can now change colorbars and 1D markers

EXAMPLES

  • general update of examples + few additions
  • added a nice example tide with mixed 2D+1D plots
  • 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,180"
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,180"
21u.y = None
22u.t = "0.5"
23u.filename = "zonalmean"
24u.get()
25u.defineplot()
26u.p[0].div = 30.
27u.p[0].colorb = "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].colorb = "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].colorb = "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.