Skip to content

Commit 9932bc9

Browse files
committed
make spanselector codeblock continuous
1 parent 30e257c commit 9932bc9

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

examples/widgets/span_selector.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
selected range is then plotted on the lower axis.
1111
"""
1212

13+
#############################################################################
14+
# .. note::
15+
#
16+
# If the SpanSelector object is garbage collected you will lose the
17+
# interactivity. You must keep a hard reference to it to prevent this.
18+
#
19+
1320
import numpy as np
1421
import matplotlib.pyplot as plt
1522
from matplotlib.widgets import SpanSelector
@@ -44,14 +51,6 @@ def onselect(xmin, xmax):
4451
fig.canvas.draw_idle()
4552

4653

47-
#############################################################################
48-
# .. note::
49-
#
50-
# If the SpanSelector object is garbage collected you will lose the
51-
# interactivity. You must keep a hard reference to it to prevent this.
52-
#
53-
54-
5554
span = SpanSelector(
5655
ax1,
5756
onselect,

0 commit comments

Comments
 (0)