Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3475a84

Browse files
authored
Merge pull request #7718 from NelleV/patch_that_doesnt_apply_cleanly
Merged 158f36e
2 parents dba5232 + daf7c40 commit 3475a84

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

lib/matplotlib/legend_handler.py

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

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

lib/matplotlib/tests/test_axes.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4820,6 +4820,12 @@ def test_scatter_color_masking():
48204820
assert linewidths[1] == 3
48214821

48224822

4823+
@cleanup
4824+
def test_eventplot_legend():
4825+
plt.eventplot([1.0], label='Label')
4826+
plt.legend()
4827+
4828+
48234829
if __name__ == '__main__':
48244830
import nose
48254831
import sys

0 commit comments

Comments
 (0)