8000 Add test stolen from @jklymak #20260; fix flake8 warning. · matplotlib/matplotlib@155ae9f · GitHub
[go: up one dir, main page]

Skip to content

Commit 155ae9f

Browse files
committed
Add test stolen from @jklymak #20260; fix flake8 warning.
1 parent 81a9464 commit 155ae9f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

lib/matplotlib/legend_handler.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ def legend_artist(self, legend, orig_handle, fontsize, handlebox)
3131
from matplotlib.lines import Line2D
3232
from matplotlib.patches import Rectangle
3333
import matplotlib.collections as mcoll
34-
import matplotlib.colors as mcolors
3534

3635

3736
def update_from_first_child(tgt, src):

lib/matplotlib/tests/test_legend.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,3 +765,11 @@ def test_plot_multiple_label_incorrect_length_exception():
765765
label = ['high', 'low', 'medium']
766766
fig, ax = plt.subplots()
767767
ax.plot(x, y, label=label)
768+
769+
770+
def test_legend_face_edgecolor():
771+
# Smoke test for PolyCollection legend handler with 'face' edgecolor.
772+
fig, ax = plt.subplots()
773+
ax.fill_between([0, 1, 2], [1, 2, 3], [2, 3, 4],
774+
facecolor='r', edgecolor='face', label='Fill')
775+
ax.legend()

0 commit comments

Comments
 (0)
0