Commit 6cc36b2a authored by Andreas Mueller's avatar Andreas Mueller

hack for old matplotlib

parent 808e8593
......@@ -262,9 +262,17 @@ class WordCloud(object):
stopwords=None, random_state=None, background_color='black',
max_font_size=None, font_step=1, mode="RGB",
relative_scaling=.5, regexp=None, collocations=True,
if font_path is None:
font_path = FONT_PATH
if color_func is None and colormap is None:
# we need a color map
import matplotlib
version = matplotlib.__version__
if version[0] < "2" and version[2] < "5":
colormap = "hsv"
colormap = "viridis"
self.colormap = colormap
self.collocations = collocations
self.font_path = font_path
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment