Commit 9914115c by BellCodeEditor

save project

parent 1c535c47
Showing with 2 additions and 1 deletions
...@@ -12,6 +12,6 @@ data = numpy.array(Image) ...@@ -12,6 +12,6 @@ data = numpy.array(Image)
img_colors = wordcloud.ImageColorGenerator(data) img_colors = wordcloud.ImageColorGenerator(data)
stopwords = ["python","的","和","基本","程序"] stopwords = ["python","的","和","基本","程序"]
w = wordcloud.WordCloud(background_color="white",font_path="SimHei.ttf", w = wordcloud.WordCloud(background_color="white",font_path="SimHei.ttf",
mask=data,color_func=img_colors) mask=data,color_func=img_colors,stopwords=stopwords, max_font_size=60)
w.generate(d) w.generate(d)
w.to_file("123.png") w.to_file("123.png")
\ No newline at end of file
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 sign in to comment