texthero/visualization.py
def scatterplot(df: pd.DataFrame,
                col: str,
                color: str = None,
                hover_data: [] = None,
                title="",
                return_figure=False):
    """
    Show scatterplot using python plotly scatter.

    Parameters
    ----------
    df
    col
        The name of the column of the DataFrame used for x and y axis.

    """

    pca0 = df[col].apply(lambda x: x[0])
    pca1 = df[col].apply(lambda x: x[1])

    fig = px.scatter(df,
                     x=pca0,
                     y=pca1,
                     color=color,
                     hover_data=hover_data,
                     title=title)
    #fig.show(config={'displayModeBar': False})
    fig.show()

    if return_figure:
        return fig

    Show scatterplot using python plotly scatter.

    Parameters
    ----------
    df
    col
        The name of the column of the DataFrame used for x and y axis.

    
Show scatterplot using python plotly scatter.
Parameters

df
col
The name of the column of the DataFrame used for x and y axis.
Show scatterplot using python plotly scatter . Parameters df col The name of the column of the DataFrame used for x and y axis .
def scatterplot(df: pd.DataFrame,
                col: str,
                color: str = None,
                hover_data: [] = None,
                title="",
                return_figure=False):
    pca0 = df[col].apply(lambda x: x[0])
    pca1 = df[col].apply(lambda x: x[1])
    fig = px.scatter(df,
                     x=pca0,
                     y=pca1,
                     color=color,
                     hover_data=hover_data,
                     title=title)
    fig.show()
    if return_figure:
        return fig
def scatterplot ( df : pd . DataFrame , col : str , color : str = None , hover_data : [ ] = None , title = "" , return_figure = False ) : pca0 = df [ col ] . apply ( lambda x : x [ 0 ] ) pca1 = df [ col ] . apply ( lambda x : x [ 1 ] ) fig = px . scatter ( df , x = pca0 , y = pca1 , color = color , hover_data = hover_data , title = title ) fig . show ( ) if return_figure : return fig
Show scatterplot using python plotly scatter.
Show scatterplot using python plotly scatter .
"""
    Show scatterplot using python plotly scatter.

    Parameters
    ----------
    df
    col
        The name of the column of the DataFrame used for x and y axis.

    """ #fig.show(config={'displayModeBar': False})
df
pd.DataFrame
col
str
color
str
hover_data
[]
title
return_figure