From a44ecc4c30d8d5e52fbb95d5cdf43394d1284d53 Mon Sep 17 00:00:00 2001 From: Eleftherios Zisis Date: Tue, 30 Apr 2024 09:15:07 +0200 Subject: [PATCH] Fix mpl.cm.get_cmap deprecation (#1122) --- examples/density_plot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/density_plot.py b/examples/density_plot.py index e7fd4ad2..b8df2990 100644 --- a/examples/density_plot.py +++ b/examples/density_plot.py @@ -70,7 +70,7 @@ def plot_density(population, # pylint: disable=too-many-arguments, too-many-loc mask = H1 < threshold # mask = H1==0 H2 = np.ma.masked_array(H1, mask) - colormap = mpl.cm.get_cmap(color_map).copy() + colormap = plt.get_cmap(color_map).copy() colormap.set_bad(color='white', alpha=None) plots = ax.contourf((xedges1[:-1] + xedges1[1:]) / 2,