This commit is contained in:
wea_ondara
2020-05-08 09:29:35 +02:00
parent 9cb9c04f92
commit 6b29d4791e

4
its.py
View File

@@ -139,11 +139,11 @@ def main(folder, intervl):
else: else:
va = "top" va = "top"
plt.text(difftime(intervals[i][0]), data[i], ("n=" if i == 0 else "") + str(len(datasingle[i])), ha="center", va=va) plt.text(difftime(intervals[i][0]), data[i], ("n=" if i == 0 else "") + str(len(datasingle[i])), ha="center", va=va)
plt.plot([difftime(intervals[i][0]) for i in range(len(datasingle)) for j in datasingle[i]], its2ols, label="sm single ITS (pvalues " + str(p2) + ")") plt.plot([difftime(intervals[i][0]) for i in range(len(datasingle)) for j in datasingle[i]], its2ols, label="sm single ITS")
# print("shape: " + str(np.shape(thresdata))) # print("shape: " + str(np.shape(thresdata)))
for (ti, t) in enumerate(thresholds): for (ti, t) in enumerate(thresholds):
# print("shape1: " + str(np.shape(thresdata[ti]))) # print("shape1: " + str(np.shape(thresdata[ti])))
plt.plot([difftime(thresiv[ti][i][0]) for i in range(len(thresdata[ti])) for j in thresdata[ti][i]], thresols[ti], label="thres ITS " + str(t) + " months (pvalues " + str(thresp[ti]) + ")") plt.plot([difftime(thresiv[ti][i][0]) for i in range(len(thresdata[ti])) for j in thresdata[ti][i]], thresols[ti], label="thres ITS " + str(t) + " months")
plt.title("Average sentiments for new users") plt.title("Average sentiments for new users")
plt.xticks(rotation=90) plt.xticks(rotation=90)
plt.xlabel("months") plt.xlabel("months")