source: trunk/UTIL/PYTHON/planetoplot_v2/pp_reload.py @ 933

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

UTIL PYTHON planetoplot_v2. units: set an additional column set_var.txt and put units over colorbar. 1D bounding and formatting. possible mode nothing. corrected bug coast/sea.

  • Property svn:executable set to *
File size: 1.6 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('-T','--title',action='store',dest='title',type="string",default=None,help='Give a new title')
13parser.add_option('-K','--marker',action='store',dest='marker',type="string",default=None,help="[1D] Define a new marker")
14parser.add_option('-P','--proj',action='store',dest='proj',type="string",default=None,help='[2D] Define a new map projection')
15parser.add_option('-C','--colorb',action='store',dest='colorb',type="string",default=None,help="[2D] Define a new colormap")
16(opt,args) = parser.parse_args()
17# -----------------------------------------------------------------------
18for files in args:
19    yeah = pp()
20    yeah.defineplot(loadfile=files)
21    yeah.out = opt.out
22    if opt.proj is not None:
23      for plot in yeah.p:
24        plot.proj = opt.proj
25    if opt.colorb is not None:
26      for plot in yeah.p:
27        plot.colorb = opt.colorb
28    if opt.marker is not None:
29      for plot in yeah.p:
30        plot.marker = opt.marker
31    if opt.title is not None:
32      for plot in yeah.p:
33        plot.title = opt.title
34    yeah.makeplot()
35
Note: See TracBrowser for help on using the repository browser.