From a83b014b5ec9225cf8dec78d92fb84be2354b878 Mon Sep 17 00:00:00 2001 From: Sam Scholten Date: Wed, 12 Aug 2026 16:06:58 +1000 Subject: plotting update --- src/scopekit/plot.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/scopekit/plot.py b/src/scopekit/plot.py index 17c7ec5..3185d67 100644 --- a/src/scopekit/plot.py +++ b/src/scopekit/plot.py @@ -1401,10 +1401,11 @@ class OscilloscopePlot: t_end_display <= xlim_display[0] or t_start_display >= xlim_display[1] ): - # Only show label for first visible region + # Only show the label on the first visible region (avoids + # duplicate legend entries); no count — the regions + # are the thing being counted, the label just names the + # colour. current_label = label if first_visible_region else "" - if first_visible_region and len(regions) > 1: - current_label = f"{label} ({len(regions)})" fill = self.ax.axvspan( t_start_display, -- cgit v1.2.3