Skip to content

Commit b3d1d0d

Browse files
authored
Get cmap from mpl.pyplot (#42)
Deprecated and then removed in matplotlib.cm; See matplotlib/matplotlib#28349
1 parent f214726 commit b3d1d0d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

squarify/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,9 @@ def plot(
225225
ax = plt.gca()
226226

227227
if color is None:
228-
import matplotlib.cm
229228
import random
230229

231-
cmap = matplotlib.cm.get_cmap()
230+
cmap = plt.get_cmap()
232231
color = [cmap(random.random()) for i in range(len(sizes))]
233232

234233
if bar_kwargs is None:

0 commit comments

Comments
 (0)