stlearn.pl.lr_result_plot¶
- stlearn.pl.lr_result_plot(adata: AnnData, use_lr: str | None = None, use_result: str | None = 'lr_sig_scores', title: str | None = None, figsize: tuple[float, float] | None = None, cmap: str = 'Spectral_r', ax: Axes | None = None, fig: Figure | None = None, show_plot: bool = True, show_axis: bool = False, show_image: bool = True, show_color_bar: bool = True, zoom_coord: tuple[float, float, float, float] | None = None, crop: bool = True, margin: float = 100, size: float = 7, image_alpha: float = 1.0, cell_alpha: float = 1.0, use_raw: bool = False, fname: str | None = None, dpi: int = 120, contour: bool = False, step_size: int | None = None, vmin: float | None = None, vmax: float | None = None)[source]¶
Plots the per spot statistics for given LR.
- Parameters:
adata (AnnData) – Data on which st.tl.cci.run has been performed
use_lr (str) – LR to show results for.
use_result (str) – LR matrix in data.obsm; ‘lr_scores’, ‘lr_sig_scores’, ‘p_vals’, ‘p_adjs’ ‘-log10(p_adjs)’.
title (str) – Plot title.
figsize (tuple) – Figure size.
cmap (str) – Color of points.
ax (Axes) – Axes on which to plot.
fig (Figure) – Figure associated with axes.
show_plot (bool) – Whether to show plot or not.
show_axis (bool) – Whether to show axis or not.
show_image (bool) – Whether to plot the image.
zoom_coord (Tuple[float, float, float, float]) – Bounding box of plot.
show_color_bar (bool) – Whether to show the color bar.
crop (bool) – Whether to crop the image down to match spatial coordinates of gene spot present.
margin (float) – Margin around the points for the image.
size (float) – Size of the points.
image_alpha (float) – Transparency of image.
cell_alpha (float) – Transparency of points.
use_raw (bool) – Whether to use adata.raw or not.
fname (str) – Name of file to save plot to.
dpi (int) – Plot saving quality.
contour (bool) – Whether to plot as contour.
step_size (int) – Step size of contour==True
vmin (float) – Minimum value of scale bar.
vmax (float) – Maximum value of scale bar.