From 0e982d748ff8bcaf4d36c662ffaed878fc6cdd93 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Thu, 29 Sep 2022 18:07:39 +0200 Subject: [PATCH] Backport PR #24037: [DOC]: make spanselector example codeblock continuous --- examples/widgets/span_selector.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/examples/widgets/span_selector.py b/examples/widgets/span_selector.py index 940948719d82..fa75a70d2863 100644 --- a/examples/widgets/span_selector.py +++ b/examples/widgets/span_selector.py @@ -8,6 +8,11 @@ Here, an x-range can be selected on the upper axis; a detailed view of the selected range is then plotted on the lower axis. + +.. note:: + + If the SpanSelector object is garbage collected you will lose the + interactivity. You must keep a hard reference to it to prevent this. """ import numpy as np @@ -44,14 +49,6 @@ def onselect(xmin, xmax): fig.canvas.draw_idle() -############################################################################# -# .. note:: -# -# If the SpanSelector object is garbage collected you will lose the -# interactivity. You must keep a hard reference to it to prevent this. -# - - span = SpanSelector( ax1, onselect,