Skip to content

Commit

Permalink
MAINT Use non-deprecated matplotlib API to get colormap
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjpfan committed Dec 4, 2023
1 parent fa7ac29 commit 8d3c3b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wordcloud/wordcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ class colormap_color_func(object):
"""
def __init__(self, colormap):
import matplotlib.pyplot as plt
self.colormap = plt.cm.get_cmap(colormap)
from matplotlib import colormaps
self.colormap = colormaps.get_cmap(colormap)

def __call__(self, word, font_size, position, orientation,
random_state=None, **kwargs):
Expand Down

0 comments on commit 8d3c3b0

Please sign in to comment.