ToastFreeware
/
toast
/
airingbutler.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf26fcd
)
add temperature plot
author
gregor herrmann
<gregor@toastfreeware.priv.at>
Sun, 25 Oct 2020 18:46:33 +0000
(19:46 +0100)
committer
gregor herrmann
<gregor@toastfreeware.priv.at>
Sun, 25 Oct 2020 18:46:33 +0000
(19:46 +0100)
plot_mhz19.py
patch
|
blob
|
history
diff --git
a/plot_mhz19.py
b/plot_mhz19.py
index 0e68605745d79cfe05f1251ae3f875bb5cc11132..526c975d8f75fe91ec9db698768ee60151c2917c 100755
(executable)
--- a/
plot_mhz19.py
+++ b/
plot_mhz19.py
@@
-22,6
+22,7
@@
with open(filename) as f:
time = []
co2 = []
+ temp = []
startdate = date(2020, 10, 22)
for row in reader:
dt = parsedatetime(row[0], startdate)
@@
-30,10
+31,13
@@
with open(filename) as f:
dt += timedelta(days=1)
time.append(dt)
co2.append(int(row[2]))
+ temp.append(int(row[3]))
plt.plot(time, co2, c = 'red')
plt.title('CO₂')
plt.xlabel('time')
plt.ylabel('ppm')
plt.tick_params(axis = 'both', which = 'major')
+ plt.gca().twinx()
+ plt.plot(time, temp, c = 'blue')
plt.show()