aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Scholten2026-08-12 16:06:58 +1000
committerSam Scholten2026-08-12 16:06:58 +1000
commita83b014b5ec9225cf8dec78d92fb84be2354b878 (patch)
tree4d61f93a2590adbdb5ba0bcba8e859c46ee36021
parent81205c1cc4b85e1561fecf40cc85e29b06077cc1 (diff)
downloadscopekit-a83b014b5ec9225cf8dec78d92fb84be2354b878.tar.gz
scopekit-a83b014b5ec9225cf8dec78d92fb84be2354b878.zip
plotting updatemain
-rw-r--r--src/scopekit/plot.py7
1 files changed, 4 insertions, 3 deletions
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,