summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2006-02-26 00:35:10 -0500
committerNathan Binkert <binkertn@umich.edu>2006-02-26 00:35:10 -0500
commitb7e4d16ea94bbfe49ac3baa5e73f04d44ee2f2f0 (patch)
treefa855ee1cc5650384f057deb8276d4d0a98e366b /util
parent0d71a17ed89cc1cfa3b2b2b5b2844687c45c2102 (diff)
downloadgem5-b7e4d16ea94bbfe49ac3baa5e73f04d44ee2f2f0.tar.xz
code cleanup
util/stats/barchart.py: clean up some of lisa's messy code remove trailing whitespace while I'm at it. --HG-- extra : convert_revision : f2fe6777fb4b458fa1d5b5b743f6274014c229ad
Diffstat (limited to 'util')
-rw-r--r--util/stats/barchart.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/util/stats/barchart.py b/util/stats/barchart.py
index f26a88d51..5d6dd0ab1 100644
--- a/util/stats/barchart.py
+++ b/util/stats/barchart.py
@@ -177,7 +177,8 @@ class BarChart(ChartOptions):
inner_axes = None
if self.xsubticks is not None:
color = self.figure.get_facecolor()
- self.metaaxes = self.figure.add_axes(self.figure_size, axisbg=color, frameon=False)
+ self.metaaxes = self.figure.add_axes(self.figure_size,
+ axisbg=color, frameon=False)
for tick in self.metaaxes.xaxis.majorTicks:
tick.tick1On = False
tick.tick2On = False
@@ -239,9 +240,11 @@ class BarChart(ChartOptions):
outer_axes.set_xticklabels(self.xticks)
if self.xsubticks is not None:
- inner_axes.set_xticks(arange((cshape[0] + 1)*cshape[2])*width + 2*center)
+ numticks = (cshape[0] + 1) * cshape[2]
+ inner_axes.set_xticks(arange(numticks) * width + 2 * center)
self.xsubticks.append('')
- inner_axes.set_xticklabels(self.xsubticks * cshape[2], fontsize=7, rotation=90)
+ inner_axes.set_xticklabels(self.xsubticks * cshape[2], fontsize=7,
+ rotation=90)
if self.legend is not None:
if dim == 1:
@@ -281,7 +284,7 @@ class BarChart(ChartOptions):
ylabel = []
#if self.ylabel:
# ylabel = [ self.ylabel[i] ]
- f.write(', '.join(ylabel + [ '%f' % val for val in row]) + '\n')
+ f.write(', '.join(ylabel + [ '%f' % v for v in row]) + '\n')
if dim == 3:
f.write("don't do 3D csv files\n")
pass