chrysalis.plot_compartments

chrysalis.plot_compartments(adata: AnnData, ncols: int = 2, size: int = 3, sample_id: Optional[Union[int, str]] = None, sample_col: str = 'sample', rotation: Union[int, float] = 0, spot_size: float = 0.85, hexcodes: Optional[List[str]] = None, title_size: int = 10, seed: Optional[int] = None, marker: str = 'h', backend='patch_collection', **scr_kw)

Visualize all compartments as individual subplots.

Parameters:
  • adata – The AnnData data matrix of shape n_obs × n_vars. Rows correspond to cells and columns to genes.

  • ncols – Number of subplot columns.

  • size – Subplot size.

  • sample_id – Sample id defined by .obs[‘sample’] column.

  • spot_size – Fine adjustments of the spot size.

  • hexcodes – List of hexadecimal colors to replace the default colormap.

  • title_size – Font size of subplot titles.

  • seed – Random seed, used for mixing colors.

  • marker – Marker type.

  • scr_kw – Matplotlib scatterplot keyword arguments.