STutils.pl.plot_cellbin_discrete

STutils.pl.plot_cellbin_discrete#

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

Plot discrete cellbin images.

Args:

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

Return type:

Axes

Returns:

Axes: matplotlib axes