From 48a2d06dc7b9dbde36d3979a019457b3d6fc188d Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 2 May 2016 15:47:33 +0200 Subject: plot: adjust y-axis MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- bench/plot.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bench') diff --git a/bench/plot.py b/bench/plot.py index ff089c3..91b33f9 100755 --- a/bench/plot.py +++ b/bench/plot.py @@ -86,6 +86,9 @@ ypoints = [ypoints[i[0]] for (i, _) in merged] values = [values[i[0]] for (i, _) in merged] labels = [' & '.join(labels[j] for j in i) for (i, _) in merged] +vmin = min(min(min(v) for v in values), 0) +vmax = max(max(max(v) for v in values), 0) + if dim == 1: plot.ylabel('time') if len(values[0]) == 1: @@ -123,6 +126,8 @@ elif dim == 2: elif dim == 3: pass +plot.ylim((vmin * 1.1, vmax * 1.1)) + if not xkcdstyle: plot.grid(True) plot.show() -- cgit v1.2.3-70-g09d2