Skip to content

Commit c265d5a

Browse files
authored
Merge pull request matplotlib#15857 from anntzer/lassoblit
FIX: LassoSelection shouldn't useblit on canvas not supporting blitting.
2 parents fb0e229 + 4979b79 commit c265d5a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/matplotlib/widgets.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2453,15 +2453,12 @@ def __init__(self, ax, onselect=None, useblit=True, lineprops=None,
24532453
button=None):
24542454
_SelectorWidget.__init__(self, ax, onselect, useblit=useblit,
24552455
button=button)
2456-
24572456
self.verts = None
2458-
24592457
if lineprops is None:
24602458
lineprops = dict()
2461-
if useblit:
2462-
lineprops['animated'] = True
2459+
# self.useblit may be != useblit, if the canvas doesn't support blit.
2460+
lineprops.update(animated=self.useblit, visible=False)
24632461
self.line = Line2D([], [], **lineprops)
2464-
self.line.set_visible(False)
24652462
self.ax.add_line(self.line)
24662463
self.artists = [self.line]
24672464

0 commit comments

Comments
 (0)