projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1eee405
)
python/demos/demo_waveform_plot.py: also set x limits
author
Paul Brossier
<piem@piem.org>
Fri, 22 Mar 2013 16:43:59 +0000
(11:43 -0500)
committer
Paul Brossier
<piem@piem.org>
Fri, 22 Mar 2013 16:43:59 +0000
(11:43 -0500)
python/demos/demo_waveform_plot.py
patch
|
blob
|
history
diff --git
a/python/demos/demo_waveform_plot.py
b/python/demos/demo_waveform_plot.py
index 41314670ec206f74beb820249d17e29f07423354..0f1f02a1c786324726e898f245a131ae139fcf69 100755
(executable)
--- a/
python/demos/demo_waveform_plot.py
+++ b/
python/demos/demo_waveform_plot.py
@@
-36,6
+36,7
@@
def get_waveform_plot(filename, samplerate = 0, block_size = 4096, ax = None):
return ax
def set_xlabels_sample2time(ax, latest_sample, samplerate):
+ ax.axis(xmin = 0, xmax = latest_sample)
if latest_sample / float(samplerate) > 60:
ax.set_xlabel('time (mm:ss)')
ax.set_xticklabels([ "%02d:%02d" % (t/float(samplerate)/60, (t/float(samplerate))%60) for t in ax.get_xticks()[:-1]], rotation = 50)