egttools.plotting.barplots.stacked_barplots

stacked_barplots(x, y, hue, data, col=None, nb_cols=None, ylabel=None, xlabel=None, figsize=(15, 8), colors=['#b2df8a', '#1f78b4', '#a6cee3'], bbox_to_anchor=(0.62, 0.4), adjust={'right': 0.9}, orderby=None)[source]

Plots stacked bar plots where with x values in the x axis and y values in the y axis and colored by hue. The plots are organized by col and plotted in a grid of columns = min(nb_cols, unique(cols)). :type x: str :param x: (str) name of the column of the pandas.Dataframe to be used as x asis :type y: str :param y: (str) name of the column of the pandas.Dataframe to use as y axis :type hue: str :param hue: (str) name of the column of the pandas.Dataframe to be used to color the stacked bar plot :type data: DataFrame :param data: (pandas.DataFrame) dataframe containing the data to be plotted :type col: Optional[str] :param col: (str) name of the column of the pandas.Dataframe to be used as index for the different plot :type nb_cols: Optional[int] :param nb_cols: (int) maximum number of columns of the plotting grid :type ylabel: Optional[str] :param ylabel: (str) label for the y axis :type xlabel: Optional[str] :param xlabel: (str) label for the x axis :type figsize: Tuple[int, int] :param figsize: tuple containing the size of the figure :type colors: List[str] :param colors: list containing the colors used in the plot :type bbox_to_anchor: Tuple[float, float] :param bbox_to_anchor: positioning of the legend in the figure :type adjust: Dict[str, float] :param adjust: dictionary containing the parameters to position the subplots in the figure :type orderby: Optional[Tuple[int, List[TypeVar(S, float, int)]]] :param orderby: Tuple(order, values). 1st element 0 or 1. 0 orders from smaller to biguer, 1 from big to small. 2nd element List of values that will determine the order of the plots. :return Dictionary(figure, axes, legend)

Return type:

Dict[str, TypeVar(T, figure, axes, Legend)]