HoloNet.plotting.feature_plot#

HoloNet.plotting.feature_plot(feature_mat, adata, feature_names, plot_feature, size=1.4, fname=None, cutoff=None, scale=False, cell_alpha=0.7, cmap='Spectral_r', **kwargs)#

Plot one feature of each cell at the spatial position.

Parameters
feature_mat Tensor | ndarrayUnion[Tensor, ndarray]

A matrix containing features in each cell (CE centrality, or generated gene expression et al).

adata AnnData

Annotated data matrix.

feature_names List[str]

The names of all features.

plot_feature str

The name of feature for plotting.

size float (default: 1.4)

The size of each spot, see sc.pl.spatial in Scanpy.

fname str | NoneOptional[str] (default: None)

The output file name. If None, not save the figure. Note that not add path name, sc.pl.spatial will add ‘show’ before the file name.

cutoff str | NoneOptional[str] (default: None)

The cutoff value (percentage) of the plotted feature.

scale bool (default: False)

If True, will scale the feature value to make the maximum into 1.

cell_alpha float (default: 0.7)

The alpha value of each spot.

cmap Colormap | strUnion[Colormap, str] (default: 'Spectral_r')

The color map of feature value of each spot, defaultly as ‘Spectral_r’.

kwargs

Other parameters in sc.pl.spatial

Return type

AnnData