summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Ward <peteraward@gmail.com>2009-10-28 18:48:32 +1100
committerPeter Ward <peteraward@gmail.com>2009-10-28 18:48:32 +1100
commitcf517eb700405758f091451f8d66fef2a2cf7108 (patch)
tree3a47a2c02e2de348bb27a3c073c21b59ae56f672
parent5f36d65c5e436fd9d822a3bd2fee2b6d3eb539e5 (diff)
Add legend, larger graphs.
-rw-r--r--stats.py12
1 files changed, 7 insertions, 5 deletions
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()