df_extensions/viz.py
def raincloud(
        self,
        groups: Optional[pd.Series] = None,
        ort: Optional[str] = "h",
        pal: Optional[str] = "Set2",
        sigma: Optional[float] = 0.2,
        title: str = "",
        all_data_label: str = "All data",
        x_label: Optional[str] = None,
        y_label: Optional[str] = None,
    ):
        """
        show a raincloud plot of the values of a series
        Optional split by a second series (group)
        with labels.
        """

        s = self._obj
        df = pd.DataFrame(s)

        if groups is not None:
            df[groups.name] = groups
            x_col = groups.name
        else:
            df[" "] = all_data_label
            x_col = " "

        f, ax = plt.subplots(figsize=(14, 2 * df[x_col].nunique()))
        pt.RainCloud(
            x=df[x_col],
            y=df[s.name],
            palette=pal,
            bw=sigma,
            width_viol=0.6,
            ax=ax,
            orient=ort,
            move=0.3,
        )
        if title:
            plt.title(title, loc="center", fontdict={"fontsize": 30})
        if x_label is not None:
            plt.xlabel(x_label, fontdict={"fontsize": 12})
        if y_label is not None:
            plt.ylabel(y_label, fontdict={"fontsize": 12}, rotation=0)
        plt.show()

        show a raincloud plot of the values of a series
        Optional split by a second series (group)
        with labels.
        
show a raincloud plot of the values of a series
Optional split by a second series (group)
with labels.
show a raincloud plot of the values of a series Optional split by a second series ( group ) with labels .
def raincloud(
        self,
        groups: Optional[pd.Series] = None,
        ort: Optional[str] = "h",
        pal: Optional[str] = "Set2",
        sigma: Optional[float] = 0.2,
        title: str = "",
        all_data_label: str = "All data",
        x_label: Optional[str] = None,
        y_label: Optional[str] = None,
    ):
        s = self._obj
        df = pd.DataFrame(s)
        if groups is not None:
            df[groups.name] = groups
            x_col = groups.name
        else:
            df[" "] = all_data_label
            x_col = " "
        f, ax = plt.subplots(figsize=(14, 2 * df[x_col].nunique()))
        pt.RainCloud(
            x=df[x_col],
            y=df[s.name],
            palette=pal,
            bw=sigma,
            width_viol=0.6,
            ax=ax,
            orient=ort,
            move=0.3,
        )
        if title:
            plt.title(title, loc="center", fontdict={"fontsize": 30})
        if x_label is not None:
            plt.xlabel(x_label, fontdict={"fontsize": 12})
        if y_label is not None:
            plt.ylabel(y_label, fontdict={"fontsize": 12}, rotation=0)
        plt.show()
def raincloud ( self , groups : Optional [ pd . Series ] = None , ort : Optional [ str ] = "h" , pal : Optional [ str ] = "Set2" , sigma : Optional [ float ] = 0.2 , title : str = "" , all_data_label : str = "All data" , x_label : Optional [ str ] = None , y_label : Optional [ str ] = None , ) : s = self . _obj df = pd . DataFrame ( s ) if groups is not None : df [ groups . name ] = groups x_col = groups . name else : df [ " " ] = all_data_label x_col = " " f , ax = plt . subplots ( figsize = ( 14 , 2 * df [ x_col ] . nunique ( ) ) ) pt . RainCloud ( x = df [ x_col ] , y = df [ s . name ] , palette = pal , bw = sigma , width_viol = 0.6 , ax = ax , orient = ort , move = 0.3 , ) if title : plt . title ( title , loc = "center" , fontdict = { "fontsize" : 30 } ) if x_label is not None : plt . xlabel ( x_label , fontdict = { "fontsize" : 12 } ) if y_label is not None : plt . ylabel ( y_label , fontdict = { "fontsize" : 12 } , rotation = 0 ) plt . show ( )
show a raincloud plot of the values of a series
Optional split by a second series (group)
with labels.
show a raincloud plot of the values of a series Optional split by a second series ( group ) with labels .
"""
        show a raincloud plot of the values of a series
        Optional split by a second series (group)
        with labels.
        """
self
groups
Optional[pd.Series]
ort
Optional[str]
pal
Optional[str]
sigma
Optional[float]
title
str
all_data_label
str
x_label
Optional[str]
y_label
Optional[str]