* Statistics *** Last month's graph #+name: org-diet-graph-month #+headers: :var data=org-diet-info() #+begin_src gnuplot :file /tmp/weight_month.png reset set xdata time set ylabel "weight (in pounds)" set timefmt "%Y-%m-%d" set term pngcairo font "Sans,10" dashed plot data using 1:2 with lines lt 3 title "weight",\ data using 1:3 with lines lw 3 lt 1 title "average weight" #+end_src #+results: org-diet-graph-month [[file:/tmp/weight_month.png]] ** Support funcs #+name: org-diet-info #+begin_src emacs-lisp (message "lol") '(("2013-05-17" "216.4" "217.23" "80%") ("2013-05-19" "217.4" "217.03" "80%") ("2013-05-20" "218.0" "217.13" "90%") ("2013-05-21" "218.0" "217.36" "90%") ("2013-05-22" "217.0" "217.24" "90%") ("2013-05-23" "217.0" "217.13" "90%") ("2013-05-24" "217.0" "217.33" "90%") ("2013-05-25" "215.0" "217.09" "90%") ("2013-05-26" "213.8" "216.62" "90%") ("2013-05-27" "216.4" "216.62" "90%") ("2013-05-28" "216.4" "216.60" "100%") ("2013-05-29" "215.8" "216.44" "100%") ("2013-05-30" "215.8" "216.22" "100%") ("2013-06-03" "215.6" "215.54" "70%")) #+end_src #+RESULTS: org-diet-info | 2013-05-17 | 216.4 | 217.23 | 80% | | 2013-05-19 | 217.4 | 217.03 | 80% | | 2013-05-20 | 218.0 | 217.13 | 90% | | 2013-05-21 | 218.0 | 217.36 | 90% | | 2013-05-22 | 217.0 | 217.24 | 90% | | 2013-05-23 | 217.0 | 217.13 | 90% | | 2013-05-24 | 217.0 | 217.33 | 90% | | 2013-05-25 | 215.0 | 217.09 | 90% | | 2013-05-26 | 213.8 | 216.62 | 90% | | 2013-05-27 | 216.4 | 216.62 | 90% | | 2013-05-28 | 216.4 | 216.60 | 100% | | 2013-05-29 | 215.8 | 216.44 | 100% | | 2013-05-30 | 215.8 | 216.22 | 100% | | 2013-06-03 | 215.6 | 215.54 | 70% |