wordcloud中自定义图片中,一直提示无法显示,百度了很多资料,没有给明确的解释,自己摸索中找到了答案,是图片灰度问题,mask图片 一定要黑白分明,直充的部分用黑色,剩于的部分用白色,就OK了
ValueError: Couldn‘t find space to draw. Either the Canvas size is too small
最新推荐文章于 2023-10-20 07:30:00 发布
在使用wordcloud库生成词云时遇到自定义图片无法正常显示的问题,博主通过尝试和研究发现,问题在于图片的灰度设置。解决方法是确保mask图片黑白分明,黑色部分对应要填充的区域,白色部分为背景,如此即可成功创建出基于自定义图案的词云图。
摘要由CSDN通过智能技术生成