mofaflex.pl.weights_covariate

mofaflex.pl.weights_covariate#

mofaflex.pl.weights_covariate(model, covariate1, covariate2=None, size=1, figsize=None)#

Plot the weights of every factor against one or two covariates.

Parameters:
  • model (MofaFlex | MOFAFLEX) – The term to plot the factors for. Can also be a MOFAFLEX object if it has only one term.

  • covariate1 (str | int) – The first covariate to plot against. Can be an integer index or the covariate name, if the covariates are named.

  • covariate2 (str | int | None (default: None)) – The first covariate to plot against. Can be an integer index or the covariate name, if the covariates are named. If None, only one covariate will be plotted.

  • size (int (default: 1)) – The point size.

  • figsize (tuple[float, float] | None (default: None)) – Figure size in inches.

Return type:

plotnine.ggplot