spcoral.plot.show_marker

Contents

spcoral.plot.show_marker#

spcoral.plot.show_marker(adata, marker, vmin=None, vmax=None, size=None, use_obsm='spatial', x_region=None, y_region=None, palette=None, cmap=None, figsize=None, dpi=None, title=None, ax=None, show=True, save=None, **kwargs)#

Plot spatial embedding for a given marker in an AnnData object.

Return type:

Optional[Axes]

Parameters:

Parameters:#

adataanndata.AnnData

The AnnData object containing the data.

markerstr

The gene or metadata column to color the embedding by.

vminOptional[float], default None

Minimum value for color scaling (continuous variables).

vmaxOptional[float], default None

Maximum value for color scaling (continuous variables).

sizeOptional[float], default None

Size of the points in the scatter plot.

use_obsmstr, default ‘spatial’

Key in adata.obsm containing the spatial coordinates.

x_regionOptional[Tuple[Union[int, float], Union[int, float]]], default None

Tuple of (min, max) for x-axis spatial region.

y_regionOptional[Tuple[Union[int, float], Union[int, float]]], default None

Tuple of (min, max) for y-axis spatial region.

paletteOptional[str], default None

Color palette for categorical variables (Matplotlib/Seaborn palette name).

cmapOptional[str], default None

Colormap for continuous variables (Matplotlib colormap name).

figsizeOptional[Tuple[float, float]], default None

Figure size as (width, height).

dpiOptional[float], default None

Figure resolution in dots per inch.

titleOptional[str], default None

Title of the plot.

axOptional[matplotlib.axes.Axes], default None

Matplotlib Axes object to plot on.

showbool, default True

Whether to display the plot.

saveOptional[Union[str, os.PathLike]], default None

Path to save the plot.

**kwargsDict[str, Any]

Additional arguments passed to scanpy.pl.embedding.

Returns:#

: Optional[matplotlib.axes.Axes]

The Matplotlib Axes object if show=False, else None.