diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/scopekit/plot.py | 7 |
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, |
