@@ -104,7 +104,7 @@ def onselect(epress, erelease):
104104 do_event (tool , 'onmove' , xdata = 100 , ydata = 120 , button = 1 )
105105 do_event (tool , 'release' , xdata = 100 , ydata = 120 , button = 1 )
106106
107- artist = tool .artists [ 0 ]
107+ artist = tool ._selection_artist
108108 assert artist .get_facecolor () == mcolors .to_rgba ('b' , alpha = 0.2 )
109109 props = dict (facecolor = 'r' , alpha = 0.3 )
110110 tool .set_props (** props )
@@ -448,7 +448,7 @@ def onselect(epress, erelease):
448448 do_event (tool , 'onmove' , xdata = 100 , ydata = 120 , button = 1 )
449449 do_event (tool , 'release' , xdata = 100 , ydata = 120 , button = 1 )
450450
451- artist = tool .artists [ 0 ]
451+ artist = tool ._selection_artist
452452 assert artist .get_facecolor () == mcolors .to_rgba ('b' , alpha = 0.2 )
453453 props = dict (facecolor = 'r' , alpha = 0.3 )
454454 tool .set_props (** props )
@@ -862,7 +862,7 @@ def onselect(vertices):
862862 for (etype , event_args ) in event_sequence :
863863 do_event (tool , etype , ** event_args )
864864
865- artist = tool .artists [ 0 ]
865+ artist = tool ._selection_artist
866866 assert artist .get_color () == 'b'
867867 assert artist .get_alpha () == 0.2
868868 props = dict (color = 'r' , alpha = 0.3 )
0 commit comments