From 1e905884905c5600b7041f6195b9ac700dc6b88e Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Fri, 22 Mar 2013 11:43:59 -0500 Subject: [PATCH] python/demos/demo_waveform_plot.py: also set x limits --- python/demos/demo_waveform_plot.py | 1 + 1 file changed, 1 insertion(+) 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) -- 2.26.2