From: Thomas Fillon Date: Tue, 24 Jun 2014 15:56:51 +0000 (+0200) Subject: feature(graphers): Improve legend aspect for segmentation+label results X-Git-Tag: 0.6~4^2~82 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=28e56bc96365523b4f3d49b5a312fcf2c77a8c34;p=timeside.git feature(graphers): Improve legend aspect for segmentation+label results --- diff --git a/timeside/analyzer/core.py b/timeside/analyzer/core.py index 86634ff..c8701d7 100644 --- a/timeside/analyzer/core.py +++ b/timeside/analyzer/core.py @@ -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)