From: Paul Brossier Date: Fri, 22 Mar 2013 16:43:59 +0000 (-0500) Subject: python/demos/demo_waveform_plot.py: also set x limits X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1e905884905c5600b7041f6195b9ac700dc6b88e;p=aubio.git python/demos/demo_waveform_plot.py: also set x limits --- diff --git a/python/demos/demo_waveform_plot.py b/python/demos/demo_waveform_plot.py index 41314670..0f1f02a1 100755 --- 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)