From: Thomas Fillon Date: Wed, 4 Mar 2015 11:54:01 +0000 (+0100) Subject: Fix Matplotlib issue X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=ef74458aeaaf4331d754ddfcef9b560ab2b62020;p=timeside.git Fix Matplotlib issue --- diff --git a/timeside/core/analyzer.py b/timeside/core/analyzer.py index 348d3a8..67f9de4 100644 --- a/timeside/core/analyzer.py +++ b/timeside/core/analyzer.py @@ -825,14 +825,14 @@ class FrameValueObject(ValueObject, FramewiseObject): # TODO: mean may not be appropriate for waveform ... (mean~=0) nb_frames = self.data.shape[0] - numchunks = size[0] + width = size[0] - if nb_frames > 10*numchunks: + if nb_frames < 10*width: ax.plot(self.time, self.data) return else: - chunksize = 1 - numchunks = nb_frames + chunksize = nb_frames // width + numchunks = nb_frames // chunksize if self.data.ndim <= 1: ychunks = self.data[:chunksize*numchunks].reshape((-1,