Commit 813b3f24 authored by Andreas Mueller's avatar Andreas Mueller

add slight variant to simple.py

parent 9aaf5337
...@@ -17,4 +17,10 @@ wordcloud = WordCloud().generate(text) ...@@ -17,4 +17,10 @@ wordcloud = WordCloud().generate(text)
# Open a plot of the generated image. # Open a plot of the generated image.
plt.imshow(wordcloud) plt.imshow(wordcloud)
plt.axis("off") plt.axis("off")
# take relative word frequencies into account, lower max_font_size
wordcloud = WordCloud(max_font_size=40, relative_scaling=.5).generate(text)
plt.figure()
plt.imshow(wordcloud)
plt.axis("off")
plt.show() plt.show()
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