Last change
on this file since 921 was
917,
checked in by aslmd, 12 years ago
|
UTIL PYTHON planetoplot_v2. Fixed bounding box problems when using Basemap and saving this in png,pdf,etc...
|
-
Property svn:executable set to
*
|
File size:
1.0 KB
|
Rev | Line | |
---|
[910] | 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 | # ----------------------------------------------------------------------- |
---|
| 7 | from optparse import OptionParser ### TBR by argparse |
---|
| 8 | from ppclass import pp |
---|
| 9 | # ----------------------------------------------------------------------- |
---|
| 10 | parser = OptionParser() |
---|
[917] | 11 | parser.add_option('-O','--out',action='store',dest='out',type="string",default="gui",help='Specify a new output format') |
---|
| 12 | parser.add_option('-P','--proj',action='store',dest='proj',type="string",default=None,help='Define a new map projection') |
---|
[910] | 13 | (opt,args) = parser.parse_args() |
---|
| 14 | # ----------------------------------------------------------------------- |
---|
| 15 | for files in args: |
---|
| 16 | yeah = pp() |
---|
| 17 | yeah.defineplot(loadfile=files) |
---|
| 18 | yeah.out = opt.out |
---|
[917] | 19 | if opt.proj is not None: |
---|
| 20 | for plot in yeah.p: |
---|
| 21 | plot.proj = opt.proj |
---|
[910] | 22 | yeah.makeplot() |
---|
| 23 | |
---|
Note: See
TracBrowser
for help on using the repository browser.