dynamo.pl.plot_energy

dynamo.pl.plot_energy(adata, basis=None, vecfld_dict=None, figsize=None, fig=None, save_show_or_return='show', save_kwargs={})[source]

Plot the energy and energy change rate over each optimization iteration.

Parameters
  • adata (AnnData) – an Annodata object with vector field function reconstructed.

  • basis (str or None (default: None)) – The reduced dimension embedding (pca or umap, for example) of cells from which vector field function was reconstructed. When basis is None, the velocity vector field function building from the full gene expression space is used.

  • vecfld_dict (str or None (default: None)) – The dictionary storing the information for the reconstructed velocity vector field function. If None, the corresponding dictionary stored in the adata object will be used.

  • figsize ([float, float] or None (default: None)) – The width and height of the resulting figure when fig is set to be None.

  • fig (matplotlib.figure.Figure or None) – The figure object where panels of the energy or energy change rate over iteration plots will be appended to.

  • save_show_or_return ({‘show’, ‘save’, ‘return’} (default: show)) – Whether to save, show or return the figure.

  • save_kwargs (dict (default: {})) – A dictionary that will passed to the save_fig function. By default it is an empty dictionary and the save_fig function will use the {“path”: None, “prefix”: ‘energy’, “dpi”: None, “ext”: ‘pdf’, “transparent”: True, “close”: True, “verbose”: True} as its parameters. Otherwise you can provide a dictionary that properly modify those keys according to your needs.

Returns

Return type

Nothing, but plot the energy or energy change rate each optimization iteration.