diff --git a/lib/matplotlib/legend.py b/lib/matplotlib/legend.py index 20d4a76e0db3..95e542f9f96c 100644 --- a/lib/matplotlib/legend.py +++ b/lib/matplotlib/legend.py @@ -1260,6 +1260,8 @@ def _parse_legend_args(axs, *args, handles=None, labels=None, **kwargs): elif len(args) >= 2: handles, labels = args[:2] extra_args = args[2:] + elif len(handles)!= len(labels): + raise ValueError("fewer handles than labels or vice versa") else: raise TypeError('Invalid arguments to legend.') 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