From ca8889bc5d83bf380832431ebb30c88ddef5a924 Mon Sep 17 00:00:00 2001 From: Tom Rondeau <trondeau@vt.edu> Date: Mon, 13 Feb 2012 14:47:42 -0500 Subject: volk: better handling of plot for error bars. Older versions of pylab don't like the kwargs. --- gnuradio-examples/python/volk_benchmark/volk_plot.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'gnuradio-examples/python') diff --git a/gnuradio-examples/python/volk_benchmark/volk_plot.py b/gnuradio-examples/python/volk_benchmark/volk_plot.py index d7578c5a72..562d4f2f75 100755 --- a/gnuradio-examples/python/volk_benchmark/volk_plot.py +++ b/gnuradio-examples/python/volk_benchmark/volk_plot.py @@ -103,14 +103,16 @@ def main(): ydata.append(table_data[t][name]['avg']) if(args.errorbars is False): - stds = None - - s0.bar(x1, ydata, width=wdth, - yerr=stds, - color=colors[i%M], label=t, - edgecolor='k', linewidth=2, - error_kw={"ecolor": 'k', "capsize":5, - "linewidth":2}) + s0.bar(x1, ydata, width=wdth, + color=colors[i%M], label=t, + edgecolor='k', linewidth=2) + else: + s0.bar(x1, ydata, width=wdth, + yerr=stds, + color=colors[i%M], label=t, + edgecolor='k', linewidth=2, + error_kw={"ecolor": 'k', "capsize":5, + "linewidth":2}) s0.legend() s0.set_ylabel("Processing time (sec) [{0:G} items]".format(res[0]['nitems']), -- cgit v1.2.3