troutpy.pl.metric_scatter#
- troutpy.pl.metric_scatter(sdata, x, y, size=1, non_control_probes=None, label_top_n_x=0, label_top_n_y=0, label_bottom_n_x=0, label_bottom_n_y=0, title=None, linewidth=0.5, figures_path='', save=False, custom_plot_filename=None, palette='troutpy')#
Creates a scatter plot of two specified metrics from a SpatialData object, highlighting control vs. non-control probes, with options to label top genes in each metric and save the figure.
- Parameters:
sdata (spatialdata.SpatialData) – A SpatialData object containing ‘xrna_metadata’ with ‘var’ DataFrame.
x (str) – Metric for x-axis.
y (str) – Metric for y-axis.
non_control_probes (str) – List of specific non-control probes to include in the plot.
label_top_n_x (int) – Number of top genes based on x to label.
label_top_n_y (int) – Number of top genes based on y to label.
label_bottom_n_x (int) – Number of bottom genes based on x to label.
label_bottom_n_y (int) – Number of bottom genes based on y to label.
title (str) – Custom title for the plot.
figures_path (str) – Directory to save the figure.
save (bool) – Whether to save the figure.
custom_plot_filename (str) – Custom filename for the saved plot.
palette (str) – Color palette for the plot.
- Return type: