troutpy.pl.rank_factor_genes_loadings#
- troutpy.pl.rank_factor_genes_loadings(sdata, layer, n_genes=20, fontsize=15, ncols=4, sharey=True, show=True, save=None, ax=None, **kwargs)#
Plot top scoring genesex for each factor from NMF/LDA.
- Parameters:
sdata (spatialdata.SpatialData) – The SpatialData object containing the factorized data.
layer (str) – The layer name in
sdatawhere the factorized results are stored.n_genes (int) – Number of top genes to display per factor, by default 20.
fontsize (int) – Font size for gene names, by default 8.
ncols (int) – Number of panels per row, by default 4.
sharey (bool) – Whether to share y-axis scale across subplots, by default True.
show (bool) – Whether to show the plot, by default True.
save (str) – Path to save the figure, by default None.
- Return type: