svgbit.plot.hotspot_distribution_map#

svgbit.plot.hotspot_distribution_map(dataset: svgbit.core.STDataset.STDataset, cluster: Union[str, int], save_path: Optional[Union[str, pathlib.Path]] = None, he_image: Optional[Union[str, pathlib.Path, PIL.Image.Image]] = None, s: float = 4, dpi: float = 300) matplotlib.figure.Figure[source]#

Draw hotspot distribution map for one SVG cluster.

Parameters
datasetSTDataset

A STDataset with hotspot and SVG cluster estimation finished.

clusterstr or int

Specify drawing cluster.

save_pathstr or pathlib.Path, default None

Heatmap save path. If None, plot will not save.

he_imagestr, pathlib.Path or PIL.Image.Image, default None

H&E image of tissue. If None is given (default), distribution map will not show tissue picture.

sfloat, default 4

Spot size.

dpifloat, default 300

DPI for saved figure.

Returns
figmatplotlib.figure.Figure

A matplotlib.figure.Figure plot.