networkcommons.visual.plot_scatter
- networkcommons.visual.plot_scatter(df, summarise_df=True, x_col='diff_dysregulation', y_col='coverage', size_col='nodes_with_phosphoinfo', hue_col='method', style_col='type', numeric_cols=None, xlabel='Difference in Activity scores', ylabel='Coverage', title='Coverage vs Difference in Activity scores', figsize=(10, 6), filepath='scatter_plot.png', render=False)
Plot a scatter plot with customizable column labels.
- Return type:
Figure- Parameters:
- dfpd.DataFrame
Input DataFrame containing the data to plot.
- summarise_dfbool, optional
Whether to summarize the random networks if a random control has been performed. Defaults to True.
- x_colstr, optional
Column name for the x-axis. Defaults to ‘diff_dysregulation’.
- y_colstr, optional
Column name for the y-axis. Defaults to ‘coverage’.
- size_colstr, optional
Column name for the size of the points. Defaults to ‘nodes_with_phosphoinfo’.
- hue_colstr, optional
Column name for the hue (color) of the points. Defaults to ‘method’.
- style_colstr, optional
Column name for the style of the points. Defaults to ‘type’.
- numeric_colslist of str, optional
List of numeric columns to summarize. Defaults to all numeric columns in the DataFrame.
- xlabelstr, optional
Label for the x-axis. Defaults to ‘Difference in Activity scores’.
- ylabelstr, optional
Label for the y-axis. Defaults to ‘Coverage’.
- titlestr, optional
Title of the plot. Defaults to ‘Coverage vs Difference in Activity scores’.
- figsizetuple, optional
Figure size of the plot. Defaults to (10, 6).
- filepathstr, optional
Path to save the plot. If None, the plot will be saved as “scatter_plot.png”. Defaults to “scatter_plot.png”.
- renderbool, optional
Whether to display the plot. Defaults to False.
- Returns:
- matplotlib.figure.Figure
The figure object for the plot.