From 980dd37e768a029dc4e3c442b999aaf1628c5464 Mon Sep 17 00:00:00 2001 From: Fabian Jankowski Date: Fri, 21 Jun 2024 01:31:56 +0200 Subject: [PATCH] Fix this on Python 3.12. The code should work on earlier versions too. --- scatfit/plotting.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scatfit/plotting.py b/scatfit/plotting.py index 476c436..c6b478e 100644 --- a/scatfit/plotting.py +++ b/scatfit/plotting.py @@ -136,9 +136,9 @@ def plot_frb_scat( model = Model(scat_model) - cmap1 = matplotlib.cm.get_cmap(cmap1) + cmap1 = plt.get_cmap(cmap1) color1 = [cmap1((ii + 2) / (df.shape[0] + 2)) for ii in range(df.shape[0])] - cmap2 = matplotlib.cm.get_cmap(cmap2) + cmap2 = plt.get_cmap(cmap2) color2 = [cmap2((ii + 2) / (df.shape[0] + 2)) for ii in range(df.shape[0])] # setting up plot