SpatialQuery.spatial_query.plot_motif_enrichment_heatmap

spatial_query.plot_motif_enrichment_heatmap(enrich_df, figsize=(7, 5), save_path=None, title=None, cmap='GnBu')[source]

Plot a heatmap showing the distribution of cell types in enriched motifs.

Parameters:
  • enrich_df (pd.DataFrame) – Output DataFrame from motif_enrichment_dist or motif_enrichment_knn.

  • figsize (tuple, default=(7, 5)) – Figure size.

  • save_path (str, optional) – Path to save the figure. If None, the figure will not be saved.

  • title (str, optional) – Figure title. If None, will use a default title based on center cell type.

  • cmap (str, default='GnBu') – Colormap for the heatmap.

Returns:

Displays a heatmap of motif cell type distribution.

Return type:

None