svgbit.plot.gene_expression#
- svgbit.plot.gene_expression(dataset: svgbit.core.STDataset.STDataset, gene: str, 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 expression for one gene.
- Parameters
- datasetSTDataset
A STDataset with hotspot and SVG cluster estimation finished.
- genestr
Which gene to draw.
- 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.