Weighing-in

Feb. 2nd, 2008 11:58 am
xela: Photo of me (Default)
[personal profile] xela
I only weighed once while I was in the not-a-cast, three weeks ago: I'd put on 3 kg since 6 weeks earlier, before the injury. Hardly surprising, given the enforced inactivity and that I had fallen back into my old habit of eating out of stress and boredom. I slapped myself about some over that, and have made some effort over the past three weeks to not be actively stupid about eating --- but I've hardly been rigorously avoiding carbs.

But when I weighed this morning those 3 kg were gone: I weigh exactly the same now as before the injury. Far better than I could have hoped for. Though it does make for an unwanted bump in my weight plot:
Plot of my weight since my stroke

Date: 2008-02-03 02:28 am (UTC)
From: [identity profile] yakshaver.livejournal.com
gnuplot, which is a bletcherous language, but the only thing I was able to find when I went looking for a tool to do this with. I have a python script that parses my weight log and generates the gnuplot script and a data file for the script to read. Here's a version of the script, with y-axis stuff stripped out; the first three lines of the script are responsible for the dates in the x-axis. (It's probably easier to read if you know that the data file format is <iso_date><tab><weight>.)
set timefmt '%Y-%m-%d'
set xdata time
set format x '%Y-%m'
unset grid
unset key
set style line 1 linetype 3 linewidth 1 pointsize 2 pointtype 3
set term png
set output '/tmp/weight.png'
plot '/tmp/weight_xela_1201966148.39.dat' using 1:2 with linespoints ls 1
You can get finer control, in a really ugly way. For another data set, where I've decided I want the x-axis labeled with the monday of every other week, this snippet of python generates the datafile and the xtics variable for the gnuplot script:
for record in table_data:
    gp_datafile.write(f_list2line(record))
    # Label every other Monday
    if i % 14 == 0:
        xtics = '%s"%s" %d, ' % (xtics, f_day_month(record[0]), i)
    i += 1

gp_datafile.close()
(I'm not sure that's enough context to make sense; if you care I'm happy to share that script and the data it's parsing.)
Edited Date: 2008-02-03 05:26 am (UTC)

Profile

xela: Photo of me (Default)
xela

November 2022

S M T W T F S
  12345
6789101112
13141516171819
202122 23242526
27282930   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 27th, 2026 11:57 am
Powered by Dreamwidth Studios