summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-02-24 18:45:46 -0500
committerGabe Black <gblack@eecs.umich.edu>2006-02-24 18:45:46 -0500
commit570535461691aa5ca36220b085b70a7c31454078 (patch)
treec0ca090614f81b6157f9d8321b8f895b1e23f9f1
parente66f521d5be35683fc9460b2c4d6b7fb35fad940 (diff)
parente5f75c2549d4881284202208c09e881886f4fdd4 (diff)
downloadgem5-570535461691aa5ca36220b085b70a7c31454078.tar.xz
Merge gblack@m5.eecs.umich.edu:/bk/multiarch
into ewok.(none):/home/gblack/m5/multiarch --HG-- extra : convert_revision : d3e160f6e938af5d2118883f8d7c91fa29a0ccaa
-rw-r--r--util/stats/barchart.py20
1 files changed, 8 insertions, 12 deletions
diff --git a/util/stats/barchart.py b/util/stats/barchart.py
index 3f202d9bf..dd3bf0180 100644
--- a/util/stats/barchart.py
+++ b/util/stats/barchart.py
@@ -151,9 +151,9 @@ class BarChart(ChartOptions):
self.metaaxes.set_yticks([])
size = [0] * 4
size[0] = self.figure_size[0]
- size[1] = self.figure_size[1] + .05
+ size[1] = self.figure_size[1] + .12
size[2] = self.figure_size[2]
- size[3] = self.figure_size[3] - .05
+ size[3] = self.figure_size[3] - .12
self.axes = self.figure.add_axes(size)
outer_axes = self.metaaxes
inner_axes = self.axes
@@ -163,12 +163,9 @@ class BarChart(ChartOptions):
inner_axes = self.axes
bars_in_group = len(self.chartdata)
- if bars_in_group < 5:
- width = 1.0 / ( bars_in_group + 1)
- center = width / 2
- else:
- width = .8 / bars_in_group
- center = .1
+
+ width = 1.0 / ( bars_in_group + 1)
+ center = width / 2
bars = []
for i,stackdata in enumerate(self.chartdata):
@@ -179,7 +176,7 @@ class BarChart(ChartOptions):
ind = arange(len(bardata)) + i * width + center
bar = self.axes.bar(ind, bardata, width, bottom=bottom,
color=colors[i][j])
- if dim != 1:
+ if self.xsubticks is not None:
self.metaaxes.bar(ind, [0] * len(bardata), width)
stack.append(bar)
bottom += bardata
@@ -207,7 +204,7 @@ class BarChart(ChartOptions):
if self.xsubticks is not None:
inner_axes.set_xticks(arange((cshape[0] + 1)*cshape[2])*width + 2*center)
self.xsubticks.append('')
- inner_axes.set_xticklabels(self.xsubticks * cshape[2], fontsize=8)
+ inner_axes.set_xticklabels(self.xsubticks * cshape[2], fontsize=7, rotation=90)
if self.legend is not None:
if dim == 1:
@@ -281,7 +278,6 @@ if __name__ == '__main__':
chart1.legend = [ 'x%d' % x for x in xrange(myshape[-1]) ]
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 ]
if len(myshape) > 2:
chart1.xsubticks = [ '%d' % x for x in xrange(myshape[1]) ]
chart1.graph()
@@ -298,4 +294,4 @@ if __name__ == '__main__':
chart2.savefig('/tmp/test2.png')
chart2.savefig('/tmp/test2.ps')
- pylab.myshow()
+# pylab.show()