source: trunk/UTIL/PYTHON/planetoplot_v2/pp_reload.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: 1.4 KB
Line 
1#! /usr/bin/env python
2# -----------------------------------------------------------------------
3# A very simple script to reload a previously saved plot array in ppclass
4# ... for a demo, try "pp_reload.py demo_data/*"
5# Author: A. Spiga 03/2013
6# -----------------------------------------------------------------------
7from optparse import OptionParser ### TBR by argparse
8from ppclass import pp
9# -----------------------------------------------------------------------
10parser = OptionParser()
11parser.add_option('-O','--out',action='store',dest='out',type="string",default="gui",help='Specify a new output format')
12parser.add_option('-K','--marker',action='store',dest='marker',type="string",default=None,help="[1D] Define a new marker")
13parser.add_option('-P','--proj',action='store',dest='proj',type="string",default=None,help='[2D] Define a new map projection')
14parser.add_option('-C','--colorb',action='store',dest='colorb',type="string",default=None,help="[2D] Define a new colormap")
15(opt,args) = parser.parse_args()
16# -----------------------------------------------------------------------
17for files in args:
18    yeah = pp()
19    yeah.defineplot(loadfile=files)
20    yeah.out = opt.out
21    if opt.proj is not None:
22      for plot in yeah.p:
23        plot.proj = opt.proj
24    if opt.colorb is not None:
25      for plot in yeah.p:
26        plot.colorb = opt.colorb
27    if opt.marker is not None:
28      for plot in yeah.p:
29        plot.marker = opt.marker
30    yeah.makeplot()
31
Note: See TracBrowser for help on using the repository browser.