Praveen's Blog

An Eternal Quest for Incremental Improvement

Plotting a weight chart using Emacs Org-Mode and Gnuplot

I discovered about Org-Mode a couple of years ago. Since then, I have started using it for various tasks. One of the recent usage is to track my daily weight. This article describes how to use Org-Mode and Gnuplot to plot your weight measurements.

Here is the list of software that I use in my setup.

For the purpose of this article, it is assumed that you have a similar setup that works for you.

As part of my daily measurement, I track three measurements namely, weight, body fat percentage and body water percentage. This data can be represented in an Org table that has four columns as follows. Please note that the data provided below is hypothetical.

#+PLOT: script:"Weight.plt"
| Date       | Weight |  BF% |  BW% |
|------------+--------+------+------|
| 05/01/2011 |  145.2 | 30.3 | 50.3 |
| 05/02/2011 |  145.1 | 29.4 | 50.7 |
| 05/03/2011 |  144.2 | 30.1 | 50.4 |
| 05/04/2011 |  144.0 | 29.0 | 50.8 |
| 05/05/2011 |  144.1 | 28.7 | 51.0 |
| 05/06/2011 |  144.2 | 29.2 | 50.7 |
| 05/07/2011 |  144.4 | 27.8 | 51.4 |
| 05/08/2011 |  143.7 | 27.6 | 51.5 |
| 05/09/2011 |  143.2 | 28.5 | 51.0 |
| 05/10/2011 |  142.8 | 30.1 | 50.4 |
| 05/11/2011 |  142.2 | 30.1 | 50.4 |
| 05/12/2011 |  142.4 | 29.8 | 50.5 |
| 05/13/2011 |  142.2 | 29.9 | 50.5 |
| 05/14/2011 |  141.2 | 27.4 | 51.6 |
| 05/15/2011 |  141.5 | 27.2 | 51.7 |
|------------+--------+------+------|
| 05/16/2011 |  141.2 | 28.8 | 51.0 |
| 05/17/2011 |  140.8 | 28.9 | 50.9 |
| 05/18/2011 |  140.2 | 29.5 | 50.7 |
| 05/19/2011 |  140.5 | 26.8 | 51.9 |
| 05/20/2011 |  140.4 | 28.1 | 51.3 |
| 05/21/2011 |  139.2 | 26.7 | 51.9 |
| 05/22/2011 |  137.1 | 27.0 | 51.7 |
| 05/23/2011 |  137.5 | 27.0 | 51.7 |
| 05/24/2011 |  137.4 | 28.5 | 51.1 |
| 05/25/2011 |  136.8 | 29.6 | 50.6 |
| 05/26/2011 |  136.3 | 28.8 | 51.0 |
| 05/27/2011 |  136.3 | 28.2 | 51.2 |
| 05/28/2011 |  136.3 | 28.9 | 50.9 |
| 05/29/2011 |  136.2 | 28.0 | 51.3 |
| 05/30/2011 |  135.9 | 28.8 | 50.9 |
| 05/31/2011 |  135.5 | 28.2 | 51.2 |
|------------+--------+------+------|
| 06/01/2011 |  135.1 | 28.2 | 51.2 |
| 06/02/2011 |  135.5 | 28.2 | 51.2 |
| 06/03/2011 |  134.8 | 28.9 | 50.9 |
| 06/04/2011 |  134.4 | 29.6 | 50.6 |
| 06/05/2011 |  134.2 | 27.9 | 51.3 |
| 06/06/2011 |  134.4 | 28.1 | 51.3 |
| 06/07/2011 |  133.2 | 29.2 | 50.8 |
| 06/08/2011 |  133.1 | 28.8 | 51.0 |
| 06/09/2011 |  133.0 | 28.6 | 51.0 |
| 06/10/2011 |  133.2 | 27.8 | 51.4 |
| 06/11/2011 |  132.2 | 27.9 | 51.4 |
| 06/12/2011 |  132.0 | 27.9 | 51.4 |
| 06/13/2011 |  132.1 | 28.9 | 51.0 |
| 06/14/2011 |  131.0 | 29.0 | 50.9 |
| 06/15/2011 |  130.2 | 27.6 | 51.5 |
|------------+--------+------+------|

I use the following Gnuplot script, Weight.plt that plots the weight, body fat percentage, absolute body fat, body water percentage and absolute body water.

Here is the screenshot of the generated plot. Click the thumbnail to get the actual size.

Weight Chart

Weight Chart


Comments