Showing the changes to python (1 of 1 file). Show all
Unified · Split
| @@ -60,6 +60,12 @@ def parse_args(): · 59 unmodified lines | ||
| 60 | 60 | parser.add_option("-p","--plot", |
| 61 | 61 | action="store_true", dest="plot", default=False, |
| 62 | 62 | help="draw plot of the pitch track") |
| 63 | + parser.add_option("-x","--xsize", | |
| 64 | + action="store", dest="xsize", default=1., | |
| 65 | + type='float', help="define xsize for plot") | |
| 66 | + parser.add_option("-y","--ysize", | |
| 67 | + action="store", dest="ysize", default=1., | |
| 68 | + type='float', help="define ysize for plot") | |
| 63 | 69 | parser.add_option("-O","--outplot", |
| 64 | 70 | action="store", dest="outplot", default=None, |
| 65 | 71 | help="save the plot to output.{ps,png,svg} instead of displaying it") |
| @@ -116,5 +122,11 @@ for i in range(len(modes)): · 50 unmodified lines | ||
| 116 | 122 | #print filetask.eval(pitch[i]) |
| 117 | 123 | if options.plot: filetask.plot(pitch,wplot,oplots,titles) |
| 118 | 124 | |
| 125 | +if options.outplot: | |
| 126 | + extension = options.outplot.split('.')[-1] | |
| 127 | + outplot = '.'.join(options.outplot.split('.')[:-1]) | |
| 128 | +else: | |
| 129 | + extension,outplot = None,None | |
| 119 | 130 | if options.plot: |
| 120 | − filetask.plotplot(wplot,oplots,titles,outplot=options.outplot,truth=options.plottruth) | |
| 131 | + filetask.plotplot(wplot,oplots,titles,outplot=outplot,extension=extension, | |
| 132 | + xsize=options.xsize,ysize=options.ysize,truth=options.plottruth) | |