首页 > 解决方案 > 如何在绘制 wordcloud 时绘制不可见的轴

问题描述

方法 plt.axis() 显示错误,因为字符串对象不可调用

我尝试重新运行代码以检查是否已使用任何 plt 轴但无效

标签: python

解决方案


plt.figure(figsize=(12,10),facecolor = 'none', edgecolor='white')
plt.imshow(lem_word_cloud)
plt.title("Lemming Cloud of Train Data")
plt.axis("off")
plt.show();
"still not sure why was the error. Now it is working after restarting"

推荐阅读