History

use gnuplot_create in plot_audio use gnuplot_create in plot_audio

Paul Brossier committed 20 years ago

Commit 9bb81511 parent 778bc7a2 files · +11 −3Browse files

Showing the changes to python (2 of 2 files). Show all

Unified · Split

2 files
  1. python/aubio/gnuplot.py +2 −2
  2. python/aubioplot-audio +9 −1
python/aubio/gnuplot.py+2−2
@@ -45,8 +45,8 @@ def audio_to_array(filename): · 44 unmodified lines
4545 time = numarray.arange(len(data))*framestep
4646 return time,data
4747
48−def plot_audio(filenames, fileout=None, start=0, end=None, noaxis=None,xsize=1.,ysize=1.):
49− g = gnuplot_init(fileout)
48+def plot_audio(filenames, outplot='', extension='', start=0, end=None, noaxis=None,xsize=1.,ysize=1.):
49+ g = gnuplot_create(outplot, extension)
5050 d = []
5151 todraw = len(filenames)
5252 xorig = 0.
python/aubioplot-audio+9−1
@@ -27,7 +27,15 @@ def parse_args(): · 26 unmodified lines
2727
2828 options, args = parse_args()
2929
30+if options.outplot:
31+ extension = options.outplot.split('.')[-1]
32+ outplot = '.'.join(options.outplot.split('.')[:-1])
33+else:
34+ extension = ''
35+ outplot = None
36+
3037 aubio.gnuplot.plot_audio(options.filename.split(','),
31− fileout=options.outplot,
38+ extension = extension,
39+ outplot = outplot,
3240 xsize=float(options.xsize),
3341 ysize=float(options.ysize))

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