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 forwidth
are now relative.orientation ({‘vertical’, ‘horizontal’}, optional) – The orientation of the bars.
vert (bool, optional) – Alternative to the
orientation
keyword arg. IfFalse
, horizontal bars are drawn. This is for consistency withboxplot
andviolinplot
.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 withnegcolor
.negcolor, poscolor (color-spec, optional) – Colors to use for the negative and positive bars. Ignored if
negpos
isFalse
. Defaults arerc.negcolor
='blue7'
andrc.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
.