Showing the changes to python (7 of 7 files). Show all
Unified · Split
| @@ -111,7 +111,7 @@ class benchonset(bench): · 110 unmodified lines | ||
| 111 | 111 | for i in self.vlist: |
| 112 | 112 | gd.append(i['GD']) |
| 113 | 113 | fp.append(i['FP']) |
| 114 | − d.append(Gnuplot.Data(fp, gd, with='linespoints', | |
| 114 | + d.append(Gnuplot.Data(fp, gd, with_='linespoints', | |
| 115 | 115 | title="%s %s" % (plottitle,i['mode']) )) |
| 116 | 116 | |
| 117 | 117 | def plotplotroc(self,d,outplot=0,extension='ps'): |
| @@ -147,7 +147,7 @@ class benchonset(bench): · 29 unmodified lines | ||
| 147 | 147 | for i in self.vlist: |
| 148 | 148 | x.append(i['prec']) |
| 149 | 149 | y.append(i['recl']) |
| 150 | − d.append(Gnuplot.Data(x, y, with='linespoints', | |
| 150 | + d.append(Gnuplot.Data(x, y, with_='linespoints', | |
| 151 | 151 | title="%s %s" % (plottitle,i['mode']) )) |
| 152 | 152 | |
| 153 | 153 | def plotplotpr(self,d,outplot=0,extension='ps'): |
| @@ -172,7 +172,7 @@ class benchonset(bench): · 18 unmodified lines | ||
| 172 | 172 | for i in self.vlist: |
| 173 | 173 | x.append(i['thres']) |
| 174 | 174 | y.append(i['dist']) |
| 175 | − d.append(Gnuplot.Data(x, y, with='linespoints', | |
| 175 | + d.append(Gnuplot.Data(x, y, with_='linespoints', | |
| 176 | 176 | title="%s %s" % (plottitle,i['mode']) )) |
| 177 | 177 | |
| 178 | 178 | def plotplotfmeas(self,d,outplot="",extension='ps', title="F-measure"): |
| @@ -205,7 +205,7 @@ class benchonset(bench): · 26 unmodified lines | ||
| 205 | 205 | for i in self.vlist: |
| 206 | 206 | x.append(i[var]) |
| 207 | 207 | y.append(i['dist']) |
| 208 | − d.append(Gnuplot.Data(x, y, with='linespoints', | |
| 208 | + d.append(Gnuplot.Data(x, y, with_='linespoints', | |
| 209 | 209 | title="%s %s" % (plottitle,i['mode']) )) |
| 210 | 210 | |
| 211 | 211 | def plotplotfmeasvar(self,d,var,outplot="",extension='ps', title="F-measure"): |
| @@ -244,7 +244,7 @@ class benchonset(bench): · 32 unmodified lines | ||
| 244 | 244 | total = v['Torig'] |
| 245 | 245 | for i in range(len(per)): per[i] /= total/100. |
| 246 | 246 | |
| 247 | − d.append(Gnuplot.Data(val, per, with='fsteps', | |
| 247 | + d.append(Gnuplot.Data(val, per, with_='fsteps', | |
| 248 | 248 | title="%s %s" % (plottitle,v['mode']) )) |
| 249 | 249 | #d.append('mean=%f,sigma=%f,eps(x) title \"\"'% (mean,smean)) |
| 250 | 250 | #d.append('mean=%f,sigma=%f,eps(x) title \"\"'% (amean,samean)) |
| @@ -275,7 +275,7 @@ class benchonset(bench): · 24 unmodified lines | ||
| 275 | 275 | total = v['Torig'] |
| 276 | 276 | for i in range(len(per)): per[i] /= total/100. |
| 277 | 277 | |
| 278 | − d.append(Gnuplot.Data(val, per, with='fsteps', | |
| 278 | + d.append(Gnuplot.Data(val, per, with_='fsteps', | |
| 279 | 279 | title="%s %s" % (plottitle,v['mode']) )) |
| 280 | 280 | #d.append('mean=%f,sigma=%f,eps(x) title \"\"'% (mean,smean)) |
| 281 | 281 | #d.append('mean=%f,sigma=%f,eps(x) title \"\"'% (amean,samean)) |
| @@ -51,7 +51,7 @@ def plotnote_withends(la,plot_title=None) : · 50 unmodified lines | ||
| 51 | 51 | la[:,2], # y centers |
| 52 | 52 | x_widths, # x errors |
| 53 | 53 | __notesheight*ones(len(la)), # y errors |
| 54 | − title=plot_title,with=('boxxyerrorbars fs 3'))) | |
| 54 | + title=plot_title,with_=('boxxyerrorbars fs 3'))) | |
| 55 | 55 | return d |
| 56 | 56 | |
| 57 | 57 | |
| @@ -66,7 +66,7 @@ def plotnote_withoutends(la,plot_title=None) : · 8 unmodified lines | ||
| 66 | 66 | la[:-1,1], # y centers |
| 67 | 67 | x_widths, # x errors |
| 68 | 68 | __notesheight*ones(len(la)-1), # y errors |
| 69 | − title=plot_title,with=('boxxyerrorbars fs 3'))) | |
| 69 | + title=plot_title,with_=('boxxyerrorbars fs 3'))) | |
| 70 | 70 | return d |
| 71 | 71 | |
| 72 | 72 | def plotnote_do(d,fileout=None): |
| @@ -247,7 +247,7 @@ class taskbeat(taskonset): · 246 unmodified lines | ||
| 247 | 247 | |
| 248 | 248 | def plot(self,oplots,results): |
| 249 | 249 | import Gnuplot |
| 250 | − oplots.append(Gnuplot.Data(results,with='linespoints',title="auto")) | |
| 250 | + oplots.append(Gnuplot.Data(results,with_='linespoints',title="auto")) | |
| 251 | 251 | |
| 252 | 252 | def plotplot(self,wplot,oplots,outplot=None,extension=None,xsize=1.,ysize=1.,spectro=False): |
| 253 | 253 | import Gnuplot |
| @@ -258,5 +258,5 @@ class taskbeat(taskonset): · 4 unmodified lines | ||
| 258 | 258 | #f = make_audio_plot(time,data) |
| 259 | 259 | |
| 260 | 260 | g = gnuplot_create(outplot=outplot, extension=extension) |
| 261 | − oplots = [Gnuplot.Data(self.gettruth(),with='linespoints',title="orig")] + oplots | |
| 261 | + oplots = [Gnuplot.Data(self.gettruth(),with_='linespoints',title="orig")] + oplots | |
| 262 | 262 | g.plot(*oplots) |
| @@ -94,15 +94,15 @@ class tasknotes(task): · 93 unmodified lines | ||
| 94 | 94 | def plot(self,now,onset,freq,ifreq,oplots): |
| 95 | 95 | import Gnuplot |
| 96 | 96 | |
| 97 | − oplots.append(Gnuplot.Data(now,freq,with='lines', | |
| 97 | + oplots.append(Gnuplot.Data(now,freq,with_='lines', | |
| 98 | 98 | title=self.params.pitchmode)) |
| 99 | − oplots.append(Gnuplot.Data(now,ifreq,with='lines', | |
| 99 | + oplots.append(Gnuplot.Data(now,ifreq,with_='lines', | |
| 100 | 100 | title=self.params.pitchmode)) |
| 101 | 101 | |
| 102 | 102 | temponsets = [] |
| 103 | 103 | for i in onset: |
| 104 | 104 | temponsets.append(i*1000) |
| 105 | − oplots.append(Gnuplot.Data(now,temponsets,with='impulses', | |
| 105 | + oplots.append(Gnuplot.Data(now,temponsets,with_='impulses', | |
| 106 | 106 | title=self.params.pitchmode)) |
| 107 | 107 | |
| 108 | 108 | def plotplot(self,wplot,oplots,outplot=None,multiplot = 0): |
| @@ -116,10 +116,10 @@ class tasknotes(task): · 7 unmodified lines | ||
| 116 | 116 | # check if ground truth exists |
| 117 | 117 | #timet,pitcht = self.gettruth() |
| 118 | 118 | #if timet and pitcht: |
| 119 | − # oplots = [Gnuplot.Data(timet,pitcht,with='lines', | |
| 119 | + # oplots = [Gnuplot.Data(timet,pitcht,with_='lines', | |
| 120 | 120 | # title='ground truth')] + oplots |
| 121 | 121 | |
| 122 | − t = Gnuplot.Data(0,0,with='impulses') | |
| 122 | + t = Gnuplot.Data(0,0,with_='impulses') | |
| 123 | 123 | |
| 124 | 124 | g = gnuplot_init(outplot) |
| 125 | 125 | g('set title \'%s\'' % (re.sub('.*/','',self.input))) |
| @@ -92,7 +92,7 @@ class taskonset(task): · 91 unmodified lines | ||
| 92 | 92 | import Gnuplot, Gnuplot.funcutils |
| 93 | 93 | import aubio.txtfile |
| 94 | 94 | import os.path |
| 95 | − from numpy import arange, array, ones | |
| 95 | + from numpy import arange, array, ones | |
| 96 | 96 | from aubio.onsetcompare import onset_roc |
| 97 | 97 | |
| 98 | 98 | x1,y1,y1p = [],[],[] |
| @@ -103,7 +103,7 @@ class taskonset(task): · 4 unmodified lines | ||
| 103 | 103 | self.maxofunc = max(ofunc) |
| 104 | 104 | # onset detection function |
| 105 | 105 | downtime = arange(len(ofunc))*self.params.step |
| 106 | − oplot.append(Gnuplot.Data(downtime,ofunc,with='lines',title=self.params.onsetmode)) | |
| 106 | + oplot.append(Gnuplot.Data(downtime,ofunc,with_='lines',title=self.params.onsetmode)) | |
| 107 | 107 | |
| 108 | 108 | # detected onsets |
| 109 | 109 | if not nplot: |
| @@ -114,8 +114,8 @@ class taskonset(task): · 4 unmodified lines | ||
| 114 | 114 | #x1 = array(onsets)*self.params.step |
| 115 | 115 | #y1 = self.maxofunc*ones(len(onsets)) |
| 116 | 116 | if x1: |
| 117 | − oplot.append(Gnuplot.Data(x1,y1,with='impulses')) | |
| 118 | − wplot.append(Gnuplot.Data(x1,y1p,with='impulses')) | |
| 117 | + oplot.append(Gnuplot.Data(x1,y1,with_='impulses')) | |
| 118 | + wplot.append(Gnuplot.Data(x1,y1p,with_='impulses')) | |
| 119 | 119 | |
| 120 | 120 | oplots.append((oplot,self.params.onsetmode,self.maxofunc)) |
| 121 | 121 | |
| @@ -128,7 +128,7 @@ class taskonset(task): · 6 unmodified lines | ||
| 128 | 128 | t_onsets = aubio.txtfile.read_datafile(datafile) |
| 129 | 129 | x2 = array(t_onsets).resize(len(t_onsets)) |
| 130 | 130 | y2 = self.maxofunc*ones(len(t_onsets)) |
| 131 | − wplot.append(Gnuplot.Data(x2,y2,with='impulses')) | |
| 131 | + wplot.append(Gnuplot.Data(x2,y2,with_='impulses')) | |
| 132 | 132 | |
| 133 | 133 | tol = 0.050 |
| 134 | 134 | |
| @@ -156,7 +156,7 @@ class taskpitch(task): · 155 unmodified lines | ||
| 156 | 156 | |
| 157 | 157 | time = [ (i+self.params.pitchdelay)*self.params.step for i in range(len(pitch)) ] |
| 158 | 158 | pitch = [aubio_freqtomidi(i) for i in pitch] |
| 159 | − oplots.append(Gnuplot.Data(time,pitch,with='lines', | |
| 159 | + oplots.append(Gnuplot.Data(time,pitch,with_='lines', | |
| 160 | 160 | title=self.params.pitchmode)) |
| 161 | 161 | titles.append(self.params.pitchmode) |
| 162 | 162 | |
| @@ -170,7 +170,7 @@ class taskpitch(task): · 7 unmodified lines | ||
| 170 | 170 | if truth: |
| 171 | 171 | timet,pitcht = self.gettruth() |
| 172 | 172 | if timet and pitcht: |
| 173 | − oplots = [Gnuplot.Data(timet,pitcht,with='lines', | |
| 173 | + oplots = [Gnuplot.Data(timet,pitcht,with_='lines', | |
| 174 | 174 | title='ground truth')] + oplots |
| 175 | 175 | |
| 176 | 176 | g = gnuplot_create(outplot=outplot, extension=extension) |
| @@ -73,10 +73,10 @@ while (taskfile.readsize == params.hopsize): · 72 unmodified lines | ||
| 73 | 73 | y = [yin.get(i,0) for i in range(params.bufsize/2)] |
| 74 | 74 | thresh = [0.1 for i in range(params.bufsize/2)] |
| 75 | 75 | #t.append((i/float(params.hopsize)+taskfile.frameread)*params.step),t.pop(0) |
| 76 | − d = [plotdata(n,a,plottitle="signal", with='lines'), | |
| 77 | − plotdata(n,c,plottitle="d[t]",axes='x1y2', with='lines lt 1'), | |
| 78 | − plotdata(n,y,plottitle="d'[t]",axes='x1y1', with='lines lt 2'), | |
| 79 | − plotdata(n,thresh,plottitle="threshold",axes='x1y1', with='lines lt 3')] | |
| 76 | + d = [plotdata(n,a,plottitle="signal", with_='lines'), | |
| 77 | + plotdata(n,c,plottitle="d[t]",axes='x1y2', with_='lines lt 1'), | |
| 78 | + plotdata(n,y,plottitle="d'[t]",axes='x1y1', with_='lines lt 2'), | |
| 79 | + plotdata(n,thresh,plottitle="threshold",axes='x1y1', with_='lines lt 3')] | |
| 80 | 80 | #g('set xrange [%f:%f]' % (t[0],t[-1])) |
| 81 | 81 | #time.sleep(.2) |
| 82 | 82 | g.reset() |