From 6d8d9f2abfb0fa87f8544674bb5d7e350c545bd3 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Tue, 14 Mar 2023 10:54:28 +0100 Subject: [PATCH] Remove unnecessary norm typecheck in tripcolor(). The check was overly restrictive (str inputs work just fine per normal ScalarMappable API) and we can just let the TriMesh/PolyCollection ctors handle the validation. --- lib/matplotlib/tri/_tripcolor.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/matplotlib/tri/_tripcolor.py b/lib/matplotlib/tri/_tripcolor.py index 3c252cdbc31b..7707f633dcdf 100644 --- a/lib/matplotlib/tri/_tripcolor.py +++ b/lib/matplotlib/tri/_tripcolor.py @@ -2,7 +2,6 @@ from matplotlib import _api from matplotlib.collections import PolyCollection, TriMesh -from matplotlib.colors import Normalize from matplotlib.tri._triangulation import Triangulation @@ -115,7 +114,6 @@ def tripcolor(ax, *args, alpha=1.0, norm=None, cmap=None, vmin=None, if 'antialiaseds' not in kwargs and ec.lower() == "none": kwargs['antialiaseds'] = False - _api.check_isinstance((Normalize, None), norm=norm) if shading == 'gouraud': if facecolors is not None: raise ValueError(