diff --git a/src/humidity/read.py b/src/humidity/read.py index 113cebb5d282e3b6c23c50797325d1a3b14d38d9..e7f9e785c4a404bfeb278c52239265d379961273 100644 --- a/src/humidity/read.py +++ b/src/humidity/read.py @@ -19,8 +19,8 @@ with open(inpath, 'r') as myfile: for x in myfile: data = x.split(",") date = data[0] - temperature = data[1] - humidity = data[2] + temperature = round(float(data[1]), 2) + humidity = round(float(data[2]), 2) dates.append(datetime.datetime.strptime(date, "%d_%m_%Y_%H_%M_%S_%f")) temperatures.append(temperature) @@ -29,4 +29,5 @@ with open(inpath, 'r') as myfile: timestamps = [(dates[i]-dates[0]).total_seconds() for i in range(len(dates))] plt.plot(timestamps, temperatures) plt.plot(timestamps, humiditys) +plt.legend(["Temperatur", "Relative Luftfeuchte"]) plt.show() \ No newline at end of file