In addition to showing weight development, the following serves as documentation on how to use orgplot and the spreadsheet module.
Date | Observation | Trend | Change |
---|---|---|---|
[2017-09-10 Dom] | 85.1 | 85.100 | 0.000 |
[2017-09-11 Seg] | 84.9 | 85.080 | -0.020 |
[2017-09-12 Ter] | 83.1 | 84.882 | -0.198 |
[2017-09-13 Qua] | 82.6 | 84.654 | -0.228 |
[2017-09-14 Qui] | 83.7 | 84.559 | -0.095 |
[2017-09-15 Sex] | 83.9 | 84.493 | -0.066 |
[2017-09-16 Sáb] | 83.7 | 84.414 | -0.079 |
[2017-09-17 Dom] | 83.9 | 84.363 | -0.051 |
[2017-09-18 Seg] | 83.5 | 84.277 | -0.086 |
[2017-09-19 Tue] | 83.4 | 84.189 | -0.088 |
[2017-09-20 Wed] | 82.5 | 84.020 | -0.169 |
[2017-09-21 Thu] | 82.3 | 83.848 | -0.172 |
[2017-09-22 Fri] | 81.8 | 83.643 | -0.205 |
[2017-09-23 Sat] | 82.8 | 83.559 | -0.084 |
[2017-09-24 Sun] | 82.3 | 83.433 | -0.126 |
[2017-09-25 Mon] | 82.5 | 83.340 | -0.093 |
[2017-09-26 Tue] | 82.9 | 83.296 | -0.044 |
[2017-09-27 Wed] | 82.6 | 83.226 | -0.070 |
[2017-09-28 Thu] | 81.4 | 83.043 | -0.183 |
[2017-09-29 Fri] | 81.7 | 82.909 | -0.134 |
[2017-09-30 Sat] | 82.0 | 82.818 | -0.091 |
[2017-10-01 Sun] | 82.3 | 82.766 | -0.052 |
[2017-10-02 Mon] | 82.4 | 82.729 | -0.037 |
[2017-10-03 Tue] | 81.7 | 82.626 | -0.103 |
[2017-10-04 Wed] | 81.3 | 82.493 | -0.133 |
[2017-10-05 Thu] | 81.7 | 82.414 | -0.079 |
[2017-10-06 Fri] | 82.3 | 82.403 | -0.011 |
[2017-10-07 Sat] | 81.3 | 82.293 | -0.110 |
[2017-10-08 Sun] | 81.8 | 82.244 | -0.049 |
[2017-10-09 Mon] | 82.3 | 82.250 | 0.006 |
[2017-10-10 Tue] | 81.2 | 82.145 | -0.105 |
[2017-10-11 Wed] | 80.5 | 81.981 | -0.164 |
[2017-10-12 Thu] | 79.7 | 81.753 | -0.228 |
[2017-10-13 Fri] | 80.2 | 81.598 | -0.155 |
[2017-10-14 Sat] | 81.0 | 81.538 | -0.060 |
[2017-10-15 Sun] | 81.5 | 81.534 | -0.004 |
[2017-10-16 Mon] | 81.3 | 81.511 | -0.023 |
[2017-10-17 Tue] | 80.8 | 81.440 | -0.071 |
[2017-10-18 Wed] | 79.9 | 81.286 | -0.154 |
[2017-10-19 Thu] | 79.8 | 81.137 | -0.149 |
[2017-10-20 Fri] | 80.1 | 81.033 | -0.104 |
[2017-10-23 Mon] | 81.3 | 81.060 | 0.027 |
[2017-10-24 Tue] | 80.7 | 81.024 | -0.036 |
[2017-10-25 Wed] | 80.1 | 80.932 | -0.092 |
[2017-10-26 Thu] | 80.1 | 80.849 | -0.083 |
[2017-10-27 Fri] | 79.8 | 80.744 | -0.105 |
[2017-10-30 Mon] | 82.5 | 80.920 | 0.176 |
[2017-10-31 Tue] | 81.4 | 80.968 | 0.048 |
[2017-11-01 Wed] | 80.8 | 80.951 | -0.017 |
[2017-11-02 Thu] | 81.4 | 80.996 | 0.045 |
[2017-11-07 Tue] | 79.9 | 80.886 | -0.110 |
[2017-11-08 Wed] | 79.4 | 80.737 | -0.149 |
[2017-11-09 Thu] | 80.3 | 80.693 | -0.044 |
[2017-11-10 Fri] | 80.5 | 80.674 | -0.019 |
[2017-11-11 Sat] | 81.0 | 80.707 | 0.033 |
[2017-11-13 Mon] | 81.2 | 80.756 | 0.049 |
[2017-11-14 Tue] | 80.2 | 80.700 | -0.056 |
[2017-11-15 Wed] | 80.5 | 80.680 | -0.020 |
[2017-11-16 Thu] | 79.7 | 80.582 | -0.098 |
[2017-11-17 Fri] | 79.4 | 80.464 | -0.118 |
[2017-12-04 Mon] | 81.6 | 80.578 | 0.114 |
[2017-12-06 Wed] | 80.5 | 80.570 | -0.008 |
[2017-12-11 Mon] | 81.0 | 80.613 | 0.043 |
[2017-12-12 Tue] | 80.8 | 80.632 | 0.019 |
[2017-12-14 Thu] | 80.1 | 80.579 | -0.053 |
[2018-01-02 Tue] | 82.5 | 80.771 | 0.192 |
[2018-01-03 Wed] | 81.4 | 80.834 | 0.063 |
[2018-01-05 Fri] | 81.3 | 80.881 | 0.047 |
[2018-01-06 Sat] | 81.0 | 80.893 | 0.012 |
[2018-01-08 Mon] | 81.7 | 80.974 | 0.081 |
[2018-01-10 Wed] | 81.1 | 80.987 | 0.013 |
[2018-01-11 Thu] | 81.4 | 81.028 | 0.041 |
[2018-01-13 Sat] | 81.5 | 81.075 | 0.047 |
[2018-01-14 Sun] | 82.2 | 81.188 | 0.113 |
[2018-01-16 Tue] | 81.7 | 81.239 | 0.051 |
[2018-01-19 Fri] | 80.5 | 81.165 | -0.074 |
[2018-01-23 Tue] | 81.1 | 81.159 | -0.006 |
[2018-01-24 Wed] | 81.0 | 81.143 | -0.016 |
[2018-01-25 Thu] | 80.7 | 81.099 | -0.044 |
[2018-01-26 Fri] | 80.3 | 81.019 | -0.080 |
[2018-01-29 Mon] | 82.1 | 81.127 | 0.108 |
[2018-02-01 Thu] | 79.1 | 80.924 | -0.203 |
[2018-02-02 Fri] | 78.9 | 80.722 | -0.202 |
[2018-02-03 Sat] | 80.1 | 80.660 | -0.062 |
[2018-02-04 Sun] | 80.5 | 80.644 | -0.016 |
[2018-02-05 Mon] | 80.9 | 80.670 | 0.026 |
[2018-02-06 Tue] | 80.6 | 80.663 | -0.007 |
[2018-02-12 Mon] | 80.4 | 80.637 | -0.026 |
[2018-02-13 Tue] | 79.9 | 80.563 | -0.074 |
[2018-02-14 Wed] | 79.9 | 80.497 | -0.066 |
[2018-02-15 Thu] | 79.7 | 80.417 | -0.080 |
[2018-02-16 Fri] | 78.1 | 80.185 | -0.232 |
Now, this shows an interesting thing. When a table is sent to gnuplot via Babel, the dates are formatted like 2017-09-13-00:00:00, so for gnuplot to interpret the x range correctly, we must let gnuplot know that we are dealing with time data, and explicitly declare the format.
Struggled with the date format for a while until I found this post: https://lists.gnu.org/archive/html/emacs-orgmode/2012-03/msg01019.html
To get vertical lines from trend to observation, I plot with yerrorbars. The 4 values are X, Y, minY maxY, so we get an observation at Y, and a line from the observation to the trend.
My latest discovery is that gnuplot can produce svg directly, by setting the terminal to svg and outputting the results as shown below:
reset
set terminal svg size 800,600
set title "Weight tracking - Helge"
set xlabel "Date of measurement"
set xdata time
set timefmt "%Y-%m-%d-%H:%M:%S"
set format x "%Y-%m-%d"
set xtics nomirror rotate by -45
set autorange x
set autorange y
set ylabel "Weight in kg"
unset bars
set rmargin 10
plot data u 1:3 smooth csplines lw 2 title 'Trend', \
data u 1:2:2:3 w yerrorbars lw 1 pt 7 title 'Observation'
Formula explanation: To avoid referencing values outside the table range, check for current row in formula https://emacs.stackexchange.com/questions/32279/org-mode-add-formula-to-generate-delta-column