From dc1fdd91eb4575ca56c2aae91d9e05dd18328082 Mon Sep 17 00:00:00 2001 From: Phlya Date: Fri, 31 May 2024 10:30:13 +0200 Subject: [PATCH] FIx import for mpl 3.9 --- cooltools/lib/plotting.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cooltools/lib/plotting.py b/cooltools/lib/plotting.py index f09841ee..e75ccf7a 100644 --- a/cooltools/lib/plotting.py +++ b/cooltools/lib/plotting.py @@ -2,7 +2,11 @@ Migrated from :mod:`mirnylib.plotting`. """ -from matplotlib.cm import register_cmap +try: + from matplotlib.cm import register_cmap +except ImportError: + from matplotlib.colormaps import register + import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np