From cf517eb700405758f091451f8d66fef2a2cf7108 Mon Sep 17 00:00:00 2001 From: Peter Ward Date: Wed, 28 Oct 2009 18:48:32 +1100 Subject: Add legend, larger graphs. --- stats.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'stats.py') diff --git a/stats.py b/stats.py index 1527701..30032b5 100644 --- a/stats.py +++ b/stats.py @@ -1,11 +1,12 @@ #!/usr/bin/env python +import sys from collections import defaultdict from pygooglechart import SimpleLineChart from colour import hash_colour -WIDTH = 600 -HEIGHT = 200 +WIDTH = 800 +HEIGHT = 300 RESULTS_FILE = 'results.csv' def main(): @@ -46,12 +47,13 @@ def main(): for filename, data in (('length_chart.png', length_data), ('time_chart.png', time_data)): - chart = SimpleLineChart(WIDTH, HEIGHT, colours=colours) + chart = SimpleLineChart(WIDTH, HEIGHT, colours=colours, legend=snakes) for series in data: chart.add_data(series) + print 'Updating', filename, '... ', + sys.stdout.flush() chart.download(filename) - - print 'Chart update!' + print 'done!' if __name__ == '__main__': main() -- cgit v1.2.3