0

I am trying to save my wordcloud and title as png or jpg.

The wordcloud is generated as wc, I then do the following from here the answer from @HeadAndTail

fig = plt.figure(1, figsize=(12, 12))
plt.axis("off")
if entit_:
    fig.suptitle(entit_, fontsize=20)
    fig.subplots_adjust(top=2.3)

plt.imshow(wc)    
fig.savefig('cluster{}.png'.format(entit_),dpi = 300)    
plt.show()
plt.close()

However it will not save the wordcloud, just the title. The cloud looks correct in my script.

BD98
  • 33
  • 3

0 Answers0