From a3b9c288d4ad06a7f468491162218818de31a31e Mon Sep 17 00:00:00 2001 From: Jody Klymak Date: Wed, 20 Dec 2017 08:29:15 -0800 Subject: [PATCH] TST: the legend repeat marker test can run --- lib/matplotlib/tests/test_legend.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py index 5e8c1f139872..458b13788504 100644 --- a/lib/matplotlib/tests/test_legend.py +++ b/lib/matplotlib/tests/test_legend.py @@ -16,6 +16,7 @@ import matplotlib.transforms as mtransforms import matplotlib.collections as mcollections from matplotlib.legend_handler import HandlerTuple +import matplotlib.legend as mlegend import inspect @@ -423,6 +424,22 @@ def test_nanscatter(): ax.grid(True) +def test_legend_repeatcheckok(): + fig, ax = plt.subplots() + ax.scatter(0.0, 1.0, color='k', marker='o', label='test') + ax.scatter(0.5, 0.0, color='r', marker='v', label='test') + hl = ax.legend() + hand, lab = mlegend._get_legend_handles_labels([ax]) + assert len(lab) == 2 + fig, ax = plt.subplots() + ax.scatter(0.0, 1.0, color='k', marker='o', label='test') + ax.scatter(0.5, 0.0, color='k', marker='v', label='test') + hl = ax.legend() + hand, lab = mlegend._get_legend_handles_labels([ax]) + assert len(lab) == 1 + + + @image_comparison(baseline_images=['not_covering_scatter'], extensions=['png']) def test_not_covering_scatter(): colors = ['b', 'g', 'r'] pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy