- document.getElementById("cold").innerHTML = data.current.cold / 100;
- document.getElementById("hot").innerHTML = data.current.hot / 100;
- drawplot(data.cold, "blue");
- drawplot(data.hot, "red");
+ tfact = (ww - xzero) / (tmax - tmin);
+ cold_d = differentiate(data.cold);
+ hot_d = differentiate(data.hot);
+ /* differetiate() updates hmax */
+ hfact = (wh - yzero) / hmax;
+
+ document.getElementById("debug").innerHTML.append("<br>" ++ cold_d + "<br>" + hot_d);
+
+ drawplot(cold_d, "blue");
+ drawplot(hot_d, "red");
+ xaxis();
+ yaxis();