source: trunk/UTIL/PYTHON/planetoplot_v2/examples/gw_v2.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: 1008 bytes
Line 
1#! /usr/bin/env python
2from ppclass import pp
3
4gw = pp()
5gw.file = "/home/aymeric/Big_Data/GALE/wrfout_d03_2024-06-09_00:00:00_z"
6gw.var = ["W","tk"]
7gw.vargoal = ["main","contour"]
8gw.x = None
9gw.y = -5.
10gw.z = None
11gw.t = 5.
12gw.verbose = True
13gw.filename = "gw"
14
15# we define global settings for plot
16# (must be done before defineplot)
17gw.colorb = "RdBu_r"
18gw.vmin = -1. ; gw.vmax = 1.
19gw.div = 30
20gw.xlabel = "East longitude (deg)"
21gw.ycoeff = 1./1000.
22gw.ylabel = "Altitude above MOLA reference (km)"
23
24# we define, get field and define, get plot
25gw.getplot()
26
27# we keep the same object for another plot of a different kind
28gw.vargoal = ["main","main"]
29gw.out = "png"
30gw.getdefineplot()
31
32# NB: global plot settings are defined in gw !!
33# ... so we redefine plot settings for the plot on the right
34gw.p[1].define_from_var() # we define colors, etc... from variable
35gw.p[1].vmin = None # we reinitialize to default for min bounds
36gw.p[1].vmax = None # we reinitialize to default for max bounds
37gw.makeplot()
Note: See TracBrowser for help on using the repository browser.