From 33f1b979dac51082c6e24342b4cbdfb8abe0e99d Mon Sep 17 00:00:00 2001 From: Serge Droz Date: Thu, 10 Sep 2026 12:06:36 +0530 Subject: [PATCH] Replace the removed get_cmap by colormaps --- squarify/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/squarify/__init__.py b/squarify/__init__.py index d7cb9e0..914d1ae 100644 --- a/squarify/__init__.py +++ b/squarify/__init__.py @@ -226,8 +226,9 @@ def plot( if color is None: import random - - cmap = plt.get_cmap() + from matplotlib import colormaps + + cmap = colormaps[plt.rcParams['image.cmap']] color = [cmap(random.random()) for i in range(len(sizes))] if bar_kwargs is None: