diff options
author | Tom Rondeau | 2012-02-13 14:47:42 -0500 |
---|---|---|
committer | Tom Rondeau | 2012-02-13 14:57:28 -0500 |
commit | ca8889bc5d83bf380832431ebb30c88ddef5a924 (patch) | |
tree | df8fe2ec1ca03e9cc66665f9d18f73da1081cb08 | |
parent | 4589b6d6f062e92fd84965eaf47d3fc30bdf516e (diff) | |
download | gnuradio-ca8889bc5d83bf380832431ebb30c88ddef5a924.tar.gz gnuradio-ca8889bc5d83bf380832431ebb30c88ddef5a924.tar.bz2 gnuradio-ca8889bc5d83bf380832431ebb30c88ddef5a924.zip |
volk: better handling of plot for error bars. Older versions of pylab don't like the kwargs.
-rwxr-xr-x | gnuradio-examples/python/volk_benchmark/volk_plot.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/gnuradio-examples/python/volk_benchmark/volk_plot.py b/gnuradio-examples/python/volk_benchmark/volk_plot.py index d7578c5a7..562d4f2f7 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']), |