Mercurial > ~darius > hgwebdir.cgi > agl
changeset 7:27540ac7879d
Set the graph title
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Mon, 11 Sep 2017 16:48:10 +0930 |
parents | 2e50426c946f |
children | 22d31cee19b1 |
files | agl.py |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/agl.py Mon Sep 11 16:47:54 2017 +0930 +++ b/agl.py Mon Sep 11 16:48:10 2017 +0930 @@ -237,6 +237,7 @@ ndays = int(max(1, round(((end - start).total_seconds()) / 86400))) for ax in fig.get_axes(): + ax.set_title('%s to %s' % (start.strftime('%Y-%m-%d'), end.strftime('%Y-%m-%d'))) ax.set_xlim([start, end]) ax.format_xdata = lambda d: matplotlib.dates.num2date(d).strftime('%d %b %H:%M') ax.xaxis.grid(True)