Showing the changes to python/aubio (1 of 1 file). Show all
Unified · Split
| @@ -167,20 +167,6 @@ def make_audio_plot(time,data,maxpoints=10000): · 166 unmodified lines | |||
| 167 | y = numarray.array(data).resize(length)[0:-1:downsample] | 167 | y = numarray.array(data).resize(length)[0:-1:downsample] |
| 168 | return Gnuplot.Data(x,y,with='lines') | 168 | return Gnuplot.Data(x,y,with='lines') |
| 169 | 169 | ||
| 170 | def gnuplot_init(outplot,debug=0,persist=1): | ||
| 171 | # prepare the plot | ||
| 172 | import Gnuplot | ||
| 173 | g = Gnuplot.Gnuplot(debug=debug, persist=persist) | ||
| 174 | if outplot == 'stdout': | ||
| 175 | g("set terminal png fontfile 'p052023l.pfb'") | ||
| 176 | #g('set output \'%s\'' % outplot) | ||
| 177 | elif outplot: | ||
| 178 | extension = outplot.split('.')[-1] | ||
| 179 | if extension == 'ps': extension = 'postscript' | ||
| 180 | g('set terminal %s' % extension) | ||
| 181 | g('set output \'%s\'' % outplot) | ||
| 182 | return g | ||
| 183 | |||
| 184 | def gnuplot_create(outplot='',extension='',debug=0,persist=1, xsize=1., ysize=1.): | 170 | def gnuplot_create(outplot='',extension='',debug=0,persist=1, xsize=1., ysize=1.): |
| 185 | import Gnuplot | 171 | import Gnuplot |
| 186 | g = Gnuplot.Gnuplot(debug=debug, persist=persist) | 172 | g = Gnuplot.Gnuplot(debug=debug, persist=persist) |