STutils.pl.plot_cellbin_gradient

STutils.pl.plot_cellbin_gradient#

STutils.pl.plot_cellbin_gradient(adata, mask, tag, prefix, colors='RdYlBu_r', dpi=600, edge_cut=300, add_scale_bar=True, add_legend=True, background='white', scale=0.5, length_fraction=0.25, ax=None, save=True)#

Plot cellbin gradient image.

Args:

adata: AnnData object mask: mask file path tag: tag name in adata.obs prefix: prefix of output file colors: color palette, defaults to “RdYlBu_r” dpi: dpi of output file, defaults to 600 edge_cut: pixels to retain in edge cutting, defaults to 300 add_scale_bar: add scale bar or not, defaults to True background: background color, defaults to “white” scale: scale bar length, defaults to 0.5 length_fraction: scale bar length fraction, defaults to 0.25 ax: matplotlib axes, defaults to None save: save figure or not, defaults to True

Return type:

Axes

Returns:

Axes: matplotlib axes