8000 Makes eventplot legend work · matplotlib/matplotlib@4ccd305 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4ccd305

Browse files
committed
Makes eventplot legend work
Fix mpl issue #7662 use ``get_linewidhts`` instead of ``get_linewidh`` to allow slicing Allows ``legend_demo5.py`` to run (previous fix was failing on CI 3.5 BUILD_DOCS=true)
1 parent 9cb8fcd commit 4ccd305

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/legend_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def get_numpoints(self, legend):
267267
return self._numpoints
268268

269269
def _default_update_prop(self, legend_handle, orig_handle):
270-
lw = orig_handle.get_linewidth()
270+
lw = orig_handle.get_linewidths()[0]
271271
dashes = orig_handle.get_dashes()[0]
272272
color = orig_handle.get_colors()[0]
273273
legend_handle.set_color(color)

0 commit comments

Comments
 (0)
0