summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorLisa Hsu <hsul@eecs.umich.edu>2006-02-18 17:29:43 -0500
committerLisa Hsu <hsul@eecs.umich.edu>2006-02-18 17:29:43 -0500
commit71bf22165acb4a330a98e183f96188daf49d078f (patch)
treeedc8173d5d02d28e27ce5a962a61c466957d3747 /util
parentb00468ce8b72853727f4a468e5f03723e6f7417d (diff)
downloadgem5-71bf22165acb4a330a98e183f96188daf49d078f.tar.xz
more changes for subtick labels.
util/stats/barchart.py: oop forgot this for 1D graph cases. util/stats/chart.py: need to add default param to chart. --HG-- extra : convert_revision : f4e6c6c614d584e7928ed905e97608716455ab6c
Diffstat (limited to 'util')
-rw-r--r--util/stats/barchart.py3
-rw-r--r--util/stats/chart.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/util/stats/barchart.py b/util/stats/barchart.py
index 99f9b8f35..ddb31be46 100644
--- a/util/stats/barchart.py
+++ b/util/stats/barchart.py
@@ -281,7 +281,8 @@ if __name__ == '__main__':
chart1.xticks = [ 'xtick%d' % x for x in xrange(myshape[0]) ]
chart1.title = 'this is the title'
chart1.figure_size = [0.1, 0.2, 0.7, 0.85 ]
- chart1.xsubticks = [ '%d' % x for x in xrange(myshape[1]) ]
+ if len(myshape) > 1:
+ chart1.xsubticks = [ '%d' % x for x in xrange(myshape[1]) ]
chart1.graph()
chart1.savefig('/tmp/test1.png')
chart1.savefig('/tmp/test1.ps')
diff --git a/util/stats/chart.py b/util/stats/chart.py
index 1e301cb58..095620172 100644
--- a/util/stats/chart.py
+++ b/util/stats/chart.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2005 The Regents of The University of Michigan
+# Copyright (c) 2005-2006 The Regents of The University of Michigan
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -38,6 +38,7 @@ class ChartOptions(object):
'xlabel' : None,
'ylabel' : None,
'xticks' : None,
+ 'xsubticks' : None,
'yticks' : None,
'ylim' : None,
}