Changeset 912 for trunk/UTIL/PYTHON/planetoplot_v2
- Timestamp:
- Mar 25, 2013, 12:11:07 AM (12 years ago)
- Location:
- trunk/UTIL/PYTHON/planetoplot_v2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/PYTHON/planetoplot_v2/dev/todo.txt
r910 r912 11 11 12 12 - more complicated computations: derivatives, histograms, spectra, etc... 13 14 - implement the operator 'and' to concatenate files over time 15 -
trunk/UTIL/PYTHON/planetoplot_v2/pp.py
r910 r912 6 6 from optparse import OptionParser ### TBR by argparse 7 7 from ppclass import pp, inspect 8 import sys 8 9 ############################################## 9 10 … … 32 33 parser.add_option('-m','--mult',action='store',dest='mult',type="float",default=None,help='') 33 34 parser.add_option('-a','--add',action='store',dest='add',type="float",default=None,help='') 35 parser.add_option('-o','--output',action='store',dest='filename',type="string",default="myplot",help='') 36 parser.add_option('-d','--directory',action='store',dest='folder',type="string",default=None,help='') 34 37 # plot --> upper case 35 38 # -- generic … … 39 42 parser.add_option('-D','--div',action='store',dest='div',type="int",default=20,help='') 40 43 parser.add_option('-H','--trans',action='store',dest='trans',type="float",default=1.0,help='') 41 parser.add_option('-O','--logy',action='store_true',dest='logy',default=False,help='') 44 parser.add_option('-Z','--logy',action='store_true',dest='logy',default=False,help='') 45 parser.add_option('-O','--save',action='store',dest='out',type="string",default="gui",help='') 42 46 # -- 1D plot 43 47 parser.add_option('-L','--lstyle',action='append',dest='lstyle',type="string",default=None,help='') … … 84 88 if opt.add is not None: user = user + opt.add 85 89 if opt.mult is not None: user = user * opt.mult 90 # get some options 91 user.superpose = opt.superpose 92 user.filename = opt.filename 93 user.folder = opt.folder 94 user.out = opt.out 86 95 # define plot 87 96 user.defineplot() … … 90 99 # make plot 91 100 user.makeplot() 101 102 #################################### 103 # save a .sh file with the command # 104 #################################### 105 command = "" 106 for arg in sys.argv: command = command + arg + ' ' 107 f = open(opt.filename+'.sh', 'w') 108 f.write(command) -
trunk/UTIL/PYTHON/planetoplot_v2/ppclass.py
r911 r912 748 748 ########################################################### 749 749 def getopt(self,opt): 750 self.superpose = opt.superpose751 750 # -- if only one, or less than the number of plots --> we take the first one 752 751 # -- if as many as number of plots --> OK, each plot has its own setting
Note: See TracChangeset
for help on using the changeset viewer.