File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 10
10
selected range is then plotted on the lower axis.
11
11
"""
12
12
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
+
13
20
import numpy as np
14
21
import matplotlib .pyplot as plt
15
22
from matplotlib .widgets import SpanSelector
@@ -44,14 +51,6 @@ def onselect(xmin, xmax):
44
51
fig .canvas .draw_idle ()
45
52
46
53
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
-
55
54
span = SpanSelector (
56
55
ax1 ,
57
56
onselect ,
You can’t perform that action at this time.
0 commit comments