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
45 time = numarray.arange(len(data))*framestep45 time = numarray.arange(len(data))*framestep
46 return time,data46 return time,data
47 47
48def plot_audio(filenames, fileout=None, start=0, end=None, noaxis=None,xsize=1.,ysize=1.):48def plot_audio(filenames, outplot='', extension='', start=0, end=None, noaxis=None,xsize=1.,ysize=1.):
49 g = gnuplot_init(fileout)49 g = gnuplot_create(outplot, extension)
50 d = []50 d = []
51 todraw = len(filenames)51 todraw = len(filenames)
52 xorig = 0.52 xorig = 0.
python/aubioplot-audio+9−1
@@ -27,7 +27,15 @@ def parse_args(): · 26 unmodified lines
27 27
28options, args = parse_args()28options, args = parse_args()
29 29
30if options.outplot:
31 extension = options.outplot.split('.')[-1]
32 outplot = '.'.join(options.outplot.split('.')[:-1])
33else:
34 extension = ''
35 outplot = None
36
30aubio.gnuplot.plot_audio(options.filename.split(','),37aubio.gnuplot.plot_audio(options.filename.split(','),
31 fileout=options.outplot,38 extension = extension,
39 outplot = outplot,
32 xsize=float(options.xsize),40 xsize=float(options.xsize),
33 ysize=float(options.ysize))41 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