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-02 09:37 pm (UTC)
From: [identity profile] zkzkz.livejournal.com
What did you use to plot the graph? I couldn't find anything convenient which could handle dates properly

Date: 2008-02-03 12:09 am (UTC)
From: [identity profile] sammason.livejournal.com
What [livejournal.com profile] zkzkz said. At work I have time-series data for which the intervals between samples are uneven and neither Excel nor SPSS does a good job with it.

And well done for losing weight. Small fluctuations are not worth being concerned about imo, it's the overall trend that matters.

Date: 2008-02-03 03:05 am (UTC)
From: [identity profile] yakshaver.livejournal.com
I just replied to [livejournal.com profile] zkzkz without having seen your comment. I'll just add that was predicated on knowing that [livejournal.com profile] zkzkz is a wizard-level programmer, which I am not and suspect you're not either. I find gnuplot to be an abhorant language: its authors have gone for terseness over clarity to a greater extent than any other programming language I've ever used. (Which, before my other friends start doing bad language one-upmanship, I will hasten to admit is only a dozen or so.) Still, a lot of scientists seem to use it, presumably because as bad as it is, it can do things other tools simply cannot.

If you decide to try it, I'll be glad to answer any questions I can. But I'm no expert: I've beaten it into submission, largely by writing python code to write gnuplot code, for three or four datasets; I expect it would take another fifty before I'd be anything close to expert. There is an active Usenet group, which is quite friendly to newcomers and has a pretty good signal to noise ratio.

(Aside for my hacker friends: gnuplot annoys me the way perl used to, in the bad old days. It would do someone's karma a world of good to do unto gnuplot what Guido did unto perl: write a tool that can do all the same things, but that regular non-hacker smart people can get productive with in fairly short order.)
Edited Date: 2008-02-03 05:28 am (UTC)

Date: 2008-02-07 09:14 pm (UTC)
From: [identity profile] sammason.livejournal.com
eek. I'm glad you pointed out that only a wizard-level programmer could do that! There are probably things I can do that neither you nor [livejournal.com profile] zkzkz can... I suppose... now where did I put that self-esteem? (only joking)

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 12:19 am
Powered by Dreamwidth Studios