bar_wrapper

bar_wrapper(self, func, x=None, height=None, width=0.8, bottom=None, *, vert=None, orientation='vertical', stacked=False, lw=None, linewidth=None, edgecolor='black', negpos=False, negcolor=None, poscolor=None, **kwargs)[source]

Supports grouping and stacking successive columns of data, and changes the default bar style.

Note

This function wraps bar.

Parameters
  • x, height, width, bottom (float or list of float, optional) – The dimensions of the bars. If the x coordinates are not provided, they are set to np.arange(0, len(height)). Note that the units for width are now relative.

  • orientation ({‘vertical’, ‘horizontal’}, optional) – The orientation of the bars.

  • vert (bool, optional) – Alternative to the orientation keyword arg. If False, horizontal bars are drawn. This is for consistency with boxplot and violinplot.

  • stacked (bool, optional) – Whether to stack columns of input data, or plot the bars side-by-side.

  • negpos (bool, optional) – Whether to shade bars greater than zero with poscolor and bars less than zero with negcolor.

  • negcolor, poscolor (color-spec, optional) – Colors to use for the negative and positive bars. Ignored if negpos is False. Defaults are rc.negcolor = 'blue7' and rc.poscolor = 'red7'.

  • lw, linewidth (float, optional) – The edge width for the bar patches.

  • edgecolor (color-spec, optional) – The edge color for the bar patches.

Other Parameters

**kwargs – Passed to bar.