- spac.visualization.spatial_plot(adata, spot_size, alpha, vmin=-999, vmax=-999, annotation=None, feature=None, layer=None, ax=None, **kwargs)[source]
Generate the spatial plot of selected features :param adata: The AnnData object containing target feature and spatial coordinates. :type adata: anndata.AnnData :param spot_size: The size of spot on the spatial plot. :type spot_size: int :param alpha: The transparency of spots, range from 0 (invisible) to 1 (solid) :type alpha: float :param vmin: The lower limit of the feature value for visualization :type vmin: float or int :param vmax: The upper limit of the feature value for visualization :type vmax: float or int :param feature: The feature to visualize on the spatial plot.
Default None.
- Parameters:
annotation (str) – The annotation to visualize in the spatial plot. Can’t be set with feature, default None.
layer (str) – Name of the AnnData object layer that wants to be plotted. By default adata.raw.X is plotted.
ax (matplotlib.axes.Axes) – The matplotlib Axes containing the analysis plots. The returned ax is the passed ax or new ax created. Only works if plotting a single component.
**kwargs – Arguments to pass to matplotlib.pyplot.scatter()
- Returns:
Single or a list of class
- Return type:
~matplotlib.axes.Axes.