mvpa2.misc.plot.base.plot_bars

mvpa2.misc.plot.base.plot_bars(data, labels=None, title=None, ylim=None, ylabel=None, width=0.2, offset=0.2, color='0.6', distance=1.0, yerr='ste', xloc=None, **kwargs)

Make bar plots with automatically computed error bars.

Candlestick plot (multiple interleaved barplots) can be done, by calling this function multiple time with appropriatly modified offset argument.

Parameters:

data : array (nbars x nobservations) or other sequence type

Source data for the barplot. Error measure is computed along the second axis.

labels : list or None

If not None, a label from this list is placed on each bar.

title : str

An optional title of the barplot.

ylim : 2-tuple

Y-axis range.

ylabel : str

An optional label for the y-axis.

width : float

Width of a bar. The value should be in a reasonable relation to distance.

offset : float

Constant offset of all bar along the x-axis. Can be used to create candlestick plots.

color : matplotlib color spec

Color of the bars.

distance : float

Distance of two adjacent bars.

yerr : {‘ste’, ‘std’, None}

Type of error for the errorbars. If None no errorbars are plotted.

xloc : sequence

Locations of the bars on the x axis.

**kwargs

Any additional arguments are passed to matplotlib’s bar() function.