[c09aa8]: / clusters / scripts / wcallcrit.py

Download this file

18 lines (13 with data), 470 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
import matplotlib.pyplot as plt
from wordcloud import WordCloud
text = ""
for j in range(300) :
f1 = open("C:/primes/data/final340numclusters/clust_" + str(j) + ".txt", 'r')
texts = f1.readlines()
for t in texts :
text = text + " " + t
wordcloud = WordCloud().generate(text)
plt.axis("off")
plt.imshow(wordcloud, interpolation="bilinear")
plt.savefig("C:/primes/data/pptclouds/cloud_all.png", bbox_inches='tight')
f1.close()