clean up
This commit is contained in:
parent
d1af517c93
commit
1e699baef4
8
count.py
8
count.py
|
|
@ -1,11 +1,7 @@
|
||||||
|
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
import plotly.plotly as py
|
|
||||||
|
|
||||||
filePath = "./test.docx"
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
#print(getTxt(filePath))
|
|
||||||
filename = "test.txt"
|
filename = "test.txt"
|
||||||
allWords = {}
|
allWords = {}
|
||||||
counter = 0
|
counter = 0
|
||||||
|
|
@ -20,6 +16,7 @@ def main():
|
||||||
allWords[word].append(counter)
|
allWords[word].append(counter)
|
||||||
counter+=1
|
counter+=1
|
||||||
|
|
||||||
|
# x,y,z for ribbon Plot
|
||||||
wordArray = [] #x
|
wordArray = [] #x
|
||||||
indexes = [] #y
|
indexes = [] #y
|
||||||
counts = [] #z
|
counts = [] #z
|
||||||
|
|
@ -31,9 +28,10 @@ def main():
|
||||||
|
|
||||||
counts.append(tmpArray)
|
counts.append(tmpArray)
|
||||||
indexes.append(allWords[word])
|
indexes.append(allWords[word])
|
||||||
|
wordArray.append(word)
|
||||||
|
|
||||||
plt.plot(allWords[word], tmpArray)
|
plt.plot(allWords[word], tmpArray)
|
||||||
wordArray.append(word)
|
|
||||||
plt.legend(wordArray)
|
plt.legend(wordArray)
|
||||||
plt.show()
|
plt.show()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue