troutpy.pl.factors_in_cells#
- troutpy.pl.factors_in_cells(sdata, layer='table', method='matrixplot', celltype_key='cell_type', cmap='troutpy', **kwargs)#
Plot per-cell factor loadings from a specified table, grouped by cell type.
- Parameters:
sdata (
SpatialData) – The SpatialData object containing the data.layer (
str(default:'table')) – The table insdatafrom which to extract the factor loadings (.obsm["factors_cell_loadings"]).method (
str(default:'matrixplot')) – The plotting method:"matrixplot","dotplot","violin", or"heatmap".celltype_key (
str(default:'cell_type')) – The key in.obsto group by.cmap (
str(default:'troutpy')) – Colormap for visualization. If not a built-in Matplotlib colormap, it is resolved viatroutpy.pl.get_colormap().kwargs (
dict[str,Any]) – Additional keyword arguments passed to the underlyingscanpy.plplotting function.
- Returns:
None