SOAPy_st.pl.show_voronoi
- SOAPy_st.pl.show_voronoi(adata: AnnData, cluster_key: str, sample_key: str | None = 'sample', sample_id: int | str | None = None, palette: Sequence[str] | ListedColormap | dict | None = None, title: str | None = None, spatial_in_obsm: str = 'spatial', figsize: Tuple[float, float] | None = None, dpi: float | None = None, ax: Axes | None = None, show: bool = True, save: str | PathLike | None = None, legend_kwargs: dict = {}, **kwargs: Any) Axes | None
Draw a Voronoi plot of the cell distribution.
Parameters
- adataanndata.AnnData
An AnnData object containing spatial omics data and spatial information.
- figsizeTuple[float, float], optional
(Width, height) of the figure.
- dpifloat, optional
The resolution of the figure.
- titlestr, optional
The title of shown figure.
- axAxes
A matplotlib axes object.
- showbool
Show the plot, do not return axis.
- saveUnion[str, PathLike], optional
The path where the image is stored.
- sample_keystr, optional
Batch’s key in adata.obs.
- sample_idUnion[int, str], optional
The sample number which to be shown.
- cluster_keystr
Keys for annotations in adata.obs.
- paletteUnion[Sequence[str], Cycler, dict]
Colors to use for plotting annotation groups.
- spatial_in_obsmstr
Keyword of coordinate information in obsm.
- legend_kwargsdict, optional
Other params of plt.legend().
- kwargsAny, optional
Other params of scipy.spatial.voronoi_plot_2d().
Returns
If show==False, return Axes.