From ef74458aeaaf4331d754ddfcef9b560ab2b62020 Mon Sep 17 00:00:00 2001 From: Thomas Fillon Date: Wed, 4 Mar 2015 12:54:01 +0100 Subject: [PATCH] Fix Matplotlib issue --- timeside/core/analyzer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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, -- 2.39.5