amueller / word_cloud

A little word cloud generator in Python
https://amueller.github.io/word_cloud
MIT License
10.1k stars 2.31k forks source link

wordcloud not compatible with matplotlib 3.9.0 release on 16/05/2024 #765

Open Bertin-fap opened 4 months ago

Bertin-fap commented 4 months ago

Description

in wordcloud.py line 106 should read self.colormap = plt .colormaps[colormap] with matplotlib 3.9.0

Steps/Code to Reproduce

Expected Results

Actual Results

Versions

cvanelteren commented 3 months ago

Facing same issue. Work around is to cast it to an array, e.g.

wc = WordCloud(width = 400, height = 400,
                   stopwords = stopwords).generate(ws)
axi.imshow(wc.to_array())