watex.view.QuickPlot.histcatdist#

QuickPlot.histcatdist(stacked=False, **kws)[source]#

Histogram plot distribution.

Plots a distributions of categorized classes according to the percentage of occurence.

Parameters
  • stacked (bool) – Pill bins one to another as a cummulative values. default is False.

  • bins (int, optional) – contains the integer or sequence or string

  • range (list, optional) – is the lower and upper range of the bins

  • density (bool, optional) – contains the boolean values

  • weights (array-like, optional) – is an array of weights, of the same shape as data

  • bottom (float, optional) – is the location of the bottom baseline of each bin

  • histtype (str, optional) – is used to draw type of histogram. {‘bar’, ‘barstacked’, step, ‘stepfilled’}

  • align (str, optional) – controls how the histogram is plotted. {‘left’, ‘mid’, ‘right’}

  • rwidth (float, optional,) – is a relative width of the bars as a fraction of the bin width

  • log (bool, optional) – is used to set histogram axis to a log scale

  • color (str, optional) – is a color spec or sequence of color specs, one per dataset

  • label (str , optional) – is a string, or sequence of strings to match multiple datasets

  • normed (bool, optional) – an optional parameter and it contains the boolean values. It uses the density keyword argument instead.

  • data (str or pd.core.DataFrame) – Path -like object or Dataframe. Long-form (tidy) dataset for plotting. Each column should correspond to a variable, and each row should correspond to an observation. If data is given as path-like object,`QuickPlot` reads and sanitizes data before plotting. Be aware in this case to provide the target name and possible the classes for data inspection. Both str or dataframe need to provide the name of target.

Returns

Returns self for easy method chaining.

Return type

QuickPlot instance

Notes

The argument for data must be passed to fit method. data parameter is not allowed in other QuickPlot method. The description of the parameter data is to give a synopsis of the kind of data the plot expected. An error will raise if force to pass data argument as a keyword arguments.

Examples

>>> from watex.view.plot import QuickPlot
>>> from watex.datasets import load_bagoue
>>> data = load_bagoue ().frame
>>> qplotObj= QuickPlot(xlabel = 'Flow classes',
                        ylabel='Number of  occurence (%)',
                        lc='b', tname='flow')
>>> qplotObj.sns_style = 'darkgrid'
>>> qplotObj.fit(data)
>>> qplotObj. histcatdist()