]> git.parisson.com Git - timeside.git/commitdiff
Fix Matplotlib issue
authorThomas Fillon <thomas@parisson.com>
Wed, 4 Mar 2015 11:54:01 +0000 (12:54 +0100)
committerThomas Fillon <thomas@parisson.com>
Wed, 4 Mar 2015 11:54:01 +0000 (12:54 +0100)
timeside/core/analyzer.py

index 348d3a8cb4742da0166137613bc286ef5baf0915..67f9de4b63f494dcb0ca322ec622cf727a18b5ed 100644 (file)
@@ -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,