watex.utils.plotutils.plot_bar#

watex.utils.plotutils.plot_bar(x, y, wh=0.8, kind='v', fig_size=(8, 6), savefig=None, xlabel=None, ylabel=None, fig_title=None, **bar_kws)[source]#

Make a vertical or horizontal bar plot.

The bars are positioned at x or y with the given alignment. Their dimensions are given by width and height. The horizontal baseline is left (default 0) while the vertical baseline is bottom (default=0)

Many parameters can take either a single value applying to all bars or a sequence of values, one for each bar.

Parameters:
  • x (float or array-like) – The x coordinates of the bars. is ‘x’ for vertical bar plot as kind is set to v``(default) or `y` for horizontal bar plot as `kind` is set to``h. See also align for the alignment of the bars to the coordinates.

  • y (float or array-like) – The height(s) for vertical and width(s) for horizonatal of the bars.

  • wh (float or array-like, default: 0.8) – The width(s) for vertical or height(s) for horizaontal of the bars.

  • kind (str, ['vertical', 'horizontal'], default='vertical') – The kind of bar plot. Can be the horizontal or vertical bar plots.

  • bar_kws (dict,) –

    Additional keywords arguments passed to :

    bar() or barh().