tomodrgn.analysis.ipy_plot_interactive#
- ipy_plot_interactive(df: DataFrame) Box [source]#
Create and display an interactive plotly scatter plot and associated ipywidgets custom widgets, allowing exploration of numeric columns of a pandas dataframe. * The scatter plot plots the selected dataframe columns with optional colormapping based on a third dataframe column. Hovertext indicates the hovered particle’s row index in the input dataframe. * The widget at bottom left allows control of the scatter plot: column selections for x, y, and colormap; which plotly colormap to use; marker size and opacity. * A custom selection can be made through a lasso selection tool on the scatter plot. The row index of selected points in the input dataframe is displayed in the table at bottom center. * The widget at bottom right allows lasso-selected points to be saved as a numpy array of df row indices stored in a timestamped pkl file.
- Sample usage:
ipy_plot_interactive(df)
- Parameters:
df – pandas dataframe to interactively plot, colormap, and select points from.
- Returns:
ipywidgets.Box containing the interactive figure and widgets