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 1010selected 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+
1320import numpy as np
1421import matplotlib .pyplot as plt
1522from 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-
5554span = SpanSelector (
5655 ax1 ,
5756 onselect ,
You can’t perform that action at this time.
0 commit comments