From 0163a5ae8370dcd84414c19d727034d367039506 Mon Sep 17 00:00:00 2001 From: Alho Markku J Date: Tue, 17 Dec 2024 17:18:12 +0200 Subject: [PATCH] Filter MPL-included colormaps with a version check --- pyPlots/colormaps.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyPlots/colormaps.py b/pyPlots/colormaps.py index 8deec41b..88013750 100644 --- a/pyPlots/colormaps.py +++ b/pyPlots/colormaps.py @@ -1170,6 +1170,9 @@ for _f in _SCMfiles: (_dummypath, _cm_name) = os.path.split(_f) _cm_name = _cm_name[:-4] + if Version(mpl_version) >= Version("3.10.0"): # MPL 3.10.0 included these colormaps, skip + if _cm_name in ["berlin","vanimo","managua"]: + continue _cm_data = np.loadtxt(_f) _cm = LinearSegmentedColormap.from_list(_cm_name, _cm_data) try: