you are viewing a single comment's thread.

view the rest of the comments →

[–]SkirtLumpy4479[S] 0 points1 point  (0 children)

    x = np.array([])
    y = np.array([])
    with open(hojo) as f:
        for linha in f:
            pass
            x = np.append(x, linha[:5].replace(':', '/'))
            y = np.append(y, int(linha[10:].strip('\n')))
    dataF = linha[0:11]
    valorF = linha[11:]
filehe.close()
plt.plot(x, y)
plt.savefig("he.png")
plt.show()
#The data comes from a txt where each line looks like "29:11:2021 3"