nmf_models.plotting.plot_weights_bar
- plot_weights_bar(nmf_model, genes, factors=None, modality='rna', title=None)[source]
Plot stacked bar chart. With features weights plotted per feature and coloured the factor.
- Parameters:
nmf_model (intNMF) – intNMF model with loadings to plot (.fit has been run)
genes (list[str]) – list of features whose weights are plooted. (used to determine the number of bars)
factors (list[int]) – factor/topics to plot feature weights. (used to color sections of the bar)
modality (str, 'rna' | 'atac') – select modality from which features are plotted.
title (str) – plot title, default None
- Return type:
matplotlib ax