source: trunk/UTIL/PYTHON/planetoplot_v2/examples/tide.py @ 923

Last change on this file since 923 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: 910 bytes
Line 
1#! /usr/bin/env python
2from ppclass import pp
3
4fi = "/home/aymeric/Big_Data/DATAPLOT/diagfired.nc"
5v = ["ps","phisinit"]
6vg = ["main","contour"]
7
8meanps = pp(file=fi,var=v,vargoal=vg,t="0,1").get()
9waveref = pp(file=fi,var=v,vargoal=vg,t=0.5).get() - meanps
10waveref.smooth(5)
11waveref.title = "$p_s$ diurnal anomaly"
12waveref.proj = "moll"
13waveref.vmin = -10
14waveref.vmax = 10
15waveref.div = 10
16waveref.filename = "tide"
17waveref.plot(extraplot=3)
18
19eqmeanps = pp(file=fi,var="ps",t="0,1",y=0.).get() 
20addplot = pp(file=fi,var="ps",t=0.5,y=0.).get() - eqmeanps
21addplot.plotin = waveref
22addplot.title = "Tide signal at the equator"
23addplot.ylabel = "$p_s$ diurnal anomaly (Pa)"
24addplot.lstyle = ""
25addplot.marker = "."
26addplot.plot()
27
28for choice_t in [0.6,0.7]:
29    wave = pp(file=fi,var=v,vargoal=vg,t=choice_t).get() - meanps
30    wave << waveref
31    wave.smooth(5)
32    wave.plotin = waveref
33    wave.plot()
34
35
36
37
38
39
40
Note: See TracBrowser for help on using the repository browser.