summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Arteaga <andyspiros@gmail.com>2012-08-04 22:23:44 +0200
committerAndrea Arteaga <andyspiros@gmail.com>2012-08-04 22:23:44 +0200
commit8cb2ee3f99cf64cb3bea74d2bb0fca9e5710594d (patch)
treee9b846e03ac43aa9bdca8dbda3e0c6d5b8180c42 /numbench/report.py
parentAdded "all" operation in blas. Updated blastests sample. Added openblas sample) (diff)
downloadauto-numerical-bench-8cb2ee3f99cf64cb3bea74d2bb0fca9e5710594d.tar.gz
auto-numerical-bench-8cb2ee3f99cf64cb3bea74d2bb0fca9e5710594d.tar.bz2
auto-numerical-bench-8cb2ee3f99cf64cb3bea74d2bb0fca9e5710594d.zip
Allow different image formats (defaults svg). Rewritten arguments parser.
Diffstat (limited to 'numbench/report.py')
-rw-r--r--numbench/report.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/numbench/report.py b/numbench/report.py
index 679aa54..5f834db 100644
--- a/numbench/report.py
+++ b/numbench/report.py
@@ -48,8 +48,8 @@ class Plotter:
self.ylabel = conf.has_key('ylabel') and conf['ylabel'] or ''
# Initialize markers
- markers = ('-', '--', 'o', 'v', '^', 's', 'p', 'h', '*', '+', 'x', 'D')
- colors = ('k', 'r', 'g', 'b')
+ markers = ('-', '--', 'v', '^', 'o', 's', 'p', 'h', '*', '+', 'x', 'D')
+ colors = ('k', 'r', 'g', 'b', 'c')
self.linestyles = tuple([c+m for m in markers for c in colors])
self.curstyle = 0
@@ -67,7 +67,8 @@ class Plotter:
plt.xlabel(self.xlabel)
plt.ylabel(self.ylabel)
plt.grid(True)
- plt.savefig(fname, format='png', bbox_inches='tight', transparent=True)
+ plt.savefig(fname, format=cfg.imageformat, \
+ bbox_inches='tight', transparent=True)
@@ -104,7 +105,7 @@ def saveReport():
x,y = np.loadtxt(resultsFile, unpack=True)
p.addPlot(x, y, tid+'/'+impl)
- imgpath = pjoin('images', operation+'.png')
+ imgpath = pjoin('images', operation+'.'+cfg.imageformat)
fname = pjoin(cfg.reportdir, imgpath)
p.savePlot(fname)
html.addFig(testdescr[operation], image=imgpath)