History

add xsize and ysize plot options in aubiopitch add xsize and ysize plot options in aubiopitch

Paul Brossier committed 20 years ago

Commit bf8e1341 parent 470a7721 file · +13 −1Browse files

Showing the changes to python (1 of 1 file). Show all

Unified · Split

python/aubiopitch+13−1
@@ -60,6 +60,12 @@ def parse_args(): · 59 unmodified lines
6060 parser.add_option("-p","--plot",
6161 action="store_true", dest="plot", default=False,
6262 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")
6369 parser.add_option("-O","--outplot",
6470 action="store", dest="outplot", default=None,
6571 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
116122 #print filetask.eval(pitch[i])
117123 if options.plot: filetask.plot(pitch,wplot,oplots,titles)
118124
125+if options.outplot:
126+ extension = options.outplot.split('.')[-1]
127+ outplot = '.'.join(options.outplot.split('.')[:-1])
128+else:
129+ extension,outplot = None,None
119130 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)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t