deepspatial.vis_utils.plot_orthogonal_projections#
- deepspatial.vis_utils.plot_orthogonal_projections(adata: AnnData, color_col: str = 'cell_class', palette: Dict[str, str] | None = None, spatial_key: str = 'spatial', z_key: str = 'z_coord', point_size: float = 0.5, alpha: float = 0.5, max_points: int | None = None, bg_color: str = 'white', save_png: str | None = None, show: bool = True) Figure | None[source]#
Generate static 2D orthogonal projections (XY, XZ, YZ) of the 3D data.
- Parameters:
adata (ad.AnnData) – Annotated data matrix.
color_col (str) – Column in adata.obs representing categories.
palette (dict, optional) – Mapping of categories to colors.
spatial_key (str) – Key in adata.obsm for XY coordinates.
z_key (str) – Key in adata.obs for Z coordinate.
point_size (float) – Scatter marker size.
alpha (float) – Marker transparency.
max_points (int, optional) – Limit number of points rendered.
bg_color (str) – Background color.
save_png (str, optional) – Path to save as a static image.
show (bool) – If True, display the plot immediately.
- Returns:
Figure object if show=False, else None.
- Return type:
matplotlib.figure.Figure or None