scHopfield.plotting.plot_eigenanalysis_grid

scHopfield.plotting.plot_eigenanalysis_grid(adata: AnnData, cluster_key: str = 'cell_type', order: List[str] | None = None, colors: Dict[str, str] | None = None, n_genes: int = 10, figsize: tuple | None = None) Figure[source]

Plot comprehensive eigenanalysis grid for all clusters.

Creates a grid with 3 columns per cluster: 1. Eigenvalue spectrum with max/min highlighted 2. Top eigenvector for max eigenvalue 3. Top eigenvector for min eigenvalue

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

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

  • order (list, optional) – Order of clusters to display

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

  • n_genes (int, optional (default: 10)) – Number of top genes to annotate

  • figsize (tuple, optional) – Figure size. If None, auto-calculated

Returns:

Figure with grid of plots

Return type:

plt.Figure