source ("config/plot-setup.m");
hours = 0:4; temperature = [12 14 13 17 16]; charge = [95 88 79 69 60];
figure (1); [ax,h1,h2] = plotyy (hours,temperature,hours,charge);
set (h1,"marker","o","color",[0 .35 .60]);
set (h2,"marker","s","color",[.80 .30 .10]);
set (ax(1),"ycolor",[0 .35 .60]); set (ax(2),"ycolor",[.80 .30 .10]);
xlim (ax(1),[-.2 4.2]); xlim (ax(2),[-.2 4.2]);
ylim (ax(1),[10 20]); ylim (ax(2),[50 100]);
xlabel (ax(1),"Time (hours)"); ylabel (ax(1),"Reading (C)");
ylabel (ax(2),"Battery charge (%)"); title (ax(1),"Each series keeps its own unit");
print (gcf, "figures/OCT-20-002.pdf", "-dpdfcairo");
close all;
