]> git.parisson.com Git - timeside.git/commitdiff
feature(graphers): Improve legend aspect for segmentation+label results
authorThomas Fillon <thomas@parisson.com>
Tue, 24 Jun 2014 15:56:51 +0000 (17:56 +0200)
committerThomas Fillon <thomas@parisson.com>
Tue, 24 Jun 2014 15:56:51 +0000 (17:56 +0200)
timeside/analyzer/core.py

index 86634ff71eb4d443af23b2a71c7b6d1701a1be06..c8701d74f5063c09d6ae168692e38d07ce243b7c 100644 (file)
@@ -897,7 +897,7 @@ class SegmentLabelObject(LabelObject, SegmentObject):
         artist = {}
         for key, label in self.label_metadata.label.items():
             ax_color[key] = colors.next()
-            artist[key] = plt.Line2D((0, 1), (0, 0), color=ax_color[key])
+            artist[key] = plt.axvspan(0, 0, color=ax_color[key], alpha=0.3)
         for time, duration, label in zip(self.time, self.duration, self.data):
             ax.axvspan(time, time + duration, color=ax_color[label], alpha=0.3)