@@ -618,27 +618,20 @@ def create_artists(self, legend, orig_handle,
618
618
orig_update_func = self ._update_prop_func
619
619
self ._update_prop_func = self ._copy_collection_props
620
620
621
- for thisx , thisy in zip (xdata_marker , ydata ):
622
- thisline = Line2D ([thisx , thisx ], [bottom , thisy ])
623
- leg_stemlines .append (thisline )
624
- self .update_prop (thisline , stemlines , legend )
621
+ for line in leg_stemlines :
622
+ self .update_prop (line , stemlines , legend )
625
623
626
- self ._update_prop_func = orig_update_func
627
624
else :
628
- for thisx , thisy in zip (xdata_marker , ydata ):
629
- thisline = Line2D ([thisx , thisx ], [bottom , thisy ])
630
- leg_stemlines .append (thisline )
631
625
for lm , m in zip (leg_stemlines , stemlines ):
632
626
self .update_prop (lm , m , legend )
633
627
628
+ if using_linecoll :
629
+ self ._update_prop_func = orig_update_func
630
+
634
631
leg_baseline = Line2D ([np .min (xdata ), np .max (xdata )],
635
632
[bottom , bottom ])
636
-
637
633
self .update_prop (leg_baseline , baseline , legend )
638
634
639
- leg_markerline = Line2D (xdata_marker , ydata [:len (xdata_marker )])
640
- self .update_prop (leg_markerline , markerline , legend )
641
-
642
635
artists = leg_stemlines
643
636
artists .append (leg_baseline )
644
637
artists .append (leg_markerline )
0 commit comments