[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] Gnuplot and year of measurement / result
From: |
Karsten Hilbert |
Subject: |
Re: [Gnumed-devel] Gnuplot and year of measurement / result |
Date: |
Wed, 4 May 2011 18:22:21 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, May 04, 2011 at 08:27:54AM -0700, Jim Busser wrote:
> What I did notice was that the output for Kirk's WBC shows (along the axis)
>
> Sep 17 18:17
>
> I just wondered whether GNUmed does not currently pass the year,
Currently, it does not export the year:
gp_data.write (u'%s %s "%s" %s %s %s %s %s %s "%s"\n' %
(
r['clin_when'].strftime('%Y-%m-%d_%H:%M'),
r['unified_val'],
gmTools.coalesce(r['val_unit'], u'"<?>"'),
gmTools.coalesce(r['unified_target_min'],
u'"<?>"'),
gmTools.coalesce(r['unified_target_max'],
u'"<?>"'),
gmTools.coalesce(r['val_normal_min'], u'"<?>"'),
gmTools.coalesce(r['val_normal_max'], u'"<?>"'),
gmTools.coalesce(r['val_target_min'], u'"<?>"'),
gmTools.coalesce(r['val_target_max'], u'"<?>"'),
r['clin_when'].strftime('%b %d %H:%M')
))
note the '%b %d %H:%M' - which btw brings me to realize a
potential bug (this will fail if %b==local_abbrev_of_month
contains Umlauts or some such - fixed)
I have now modified this to make the format:
%b %d %H:%M (%Y)
meaning appending the year in parenthesis if it's different
from the previous x-tick.
Karsten
--
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
screenshot_001.png
Description: PNG image