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

Appearance settings

Commit 9932bc9

Browse filesBrowse files
committed
make spanselector codeblock continuous
1 parent 30e257c commit 9932bc9
Copy full SHA for 9932bc9

File tree

Expand file treeCollapse file tree

1 file changed

+7
-8
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-8
lines changed

‎examples/widgets/span_selector.py

Copy file name to clipboardExpand all lines: examples/widgets/span_selector.py
+7-8Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.