scHopfield.plotting.plot_eigenvalue_spectrum

scHopfield.plotting.plot_eigenvalue_spectrum(adata: AnnData, clusters: str | List[str] | None = None, cluster_key: str = 'cell_type', colors: Dict[str, str] | None = None, highlight_extremes: bool = True, figsize: tuple | None = None, ax: Axes | None = None) Axes[source]

Plot eigenvalue spectrum in the complex plane.

Parameters:
  • adata (AnnData) – Annotated data object with computed eigenanalysis

  • clusters (str or list, optional) – Cluster(s) to plot. If None, plots all clusters

  • cluster_key (str, optional (default: 'cell_type')) – Key in adata.obs for cluster labels

  • colors (dict, optional) – Colors for each cluster

  • highlight_extremes (bool, optional (default: True)) – Whether to highlight eigenvalues with max/min real parts

  • figsize (tuple, optional) – Figure size

  • ax (plt.Axes, optional) – Axes to plot on

Returns:

Axes with plot

Return type:

plt.Axes