History

if spectrum shorter than 1 second, use ms not s if spectrum shorter than 1 second, use ms not s

Paul Brossier committed 20 years ago

Commit 778bc7a1 parent e638bcf1 file · +5 −1Browse files

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

Unified · Split

python/aubio/gnuplot.py+5−1
@@ -122,7 +122,11 @@ def plot_spec(filename, outplot='',extension='', fileout=None, start=0, end=None · 121 unmodified lines
122122 data,time,freq = audio_to_spec(filename,minf=minf,maxf=maxf,bufsize=bufsize,hopsize=hopsize)
123123 xorig = 0.
124124 if not noaxis:
125− g.xlabel('Time (s)')
125+ if max(time) < 1.:
126+ time = [t*1000. for t in time]
127+ g.xlabel('Time (ms)')
128+ else:
129+ g.xlabel('Time (s)')
126130 g.ylabel('Frequency (Hz)')
127131 g('set size %f,%f' % (xsize, ysize))
128132 g('set pm3d map')

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