This commit is contained in:
wea_ondara
2020-04-11 14:07:57 +02:00
parent 4195c83ef8
commit 06085870a1
6 changed files with 66 additions and 33 deletions

4
its.py
View File

@@ -7,7 +7,7 @@ from datetime import datetime
from datetime import timedelta
from dateutil.relativedelta import relativedelta
from common import calc_intervals, printnoln, rprint, DAYS_NEW_USER, difftime
from common import calc_intervals, printnoln, rprint, DAYS_NEW_USER, FIG_SIZE, difftime
from loader import load, dmt, cms
from sentiments import readtoxleveltxt
@@ -118,7 +118,7 @@ def main(folder, intervl):
with open(outputdir + "/summary_threshold" + str(ti) + "-i" + str(intervl) + ".txt", "w") as file:
file.write(str(res.summary()))
fig = plt.figure(figsize=(16, 12))
fig = plt.figure(figsize=FIG_SIZE)
plt.plot([difftime(i[0]) for i in intervals], data, label="average sentiment")
plt.grid(True)
for i in range(len(data)):