troutpy.pl.factors_in_cells#
- troutpy.pl.factors_in_cells(sdata, layer='table', method='matrixplot', celltype_key='cell_type', cmap='troutpy', **kwargs)#
Plot factors from a specified layer in a Scanpy AnnData object.
- Parameters:
sdata (spatialdata.SpatialData) – The SpatialData object containing the data.
layer (str) – The layer from which to extract the factors (default: ‘table’).
method (str) – The plotting method (‘matrixplot’, ‘dotplot’, ‘violin’).
celltype_key (str) – The key in
.obsto group by (default: ‘cell_type’).title (str) – Title for the plot (default: ‘’).
kwargs (
dict[str,Any]) – Additional keyword arguments passed to the plotting function.