Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0e982d7

Browse files
timhoffmmeeseeksmachine
authored andcommitted
Backport PR matplotlib#24037: [DOC]: make spanselector example codeblock continuous
1 parent b2de5a5 commit 0e982d7

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

‎examples/widgets/span_selector.py‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
99
Here, an x-range can be selected on the upper axis; a detailed view of the
1010
selected range is then plotted on the lower axis.
11+
12+
.. note::
13+
14+
If the SpanSelector object is garbage collected you will lose the
15+
interactivity. You must keep a hard reference to it to prevent this.
1116
"""
1217

1318
import numpy as np
@@ -44,14 +49,6 @@ def onselect(xmin, xmax):
4449
fig.canvas.draw_idle()
4550

4651

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-
5552
span = SpanSelector(
5653
ax1,
5754
onselect,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /