voyagerpy.plotting.imshow#

voyagerpy.plotting.imshow(adata: AnnData, res: str | None = None, ax: Axes | None = None, tmp: bool = False, title: str | None = None, **kwargs) Axes#

Show an image stored in adata.uns[“spatial”].

Draw the image stored in adata.uns[“spatial”][“img”][res] on the axis ax. If ax is None, a new axis is created. If tmp is True, use a temporary image, which is useful to show an image with unapplied transformations.

Parameters:
  • adata (AnnData) – The AnnData object containing the image.

  • res (Optional[str], optional) – The resolution of the image to show. If None, the first resolution found is used, by default None.

  • ax (Optional[Axes], optional) – The axis showing the image. If None, a new axis is created, by default None.

  • tmp (bool, optional) – If True, a temporary image is shown, by default False. This is useful to show an image with unapplied transformations.

  • title (Optional[str], optional) – The title for the axis, by default None

  • **kwargs (optional) – Parameters passed to matplotlib.axes.Axes.imshow().

Returns:

The axis showing the image.

Return type:

Axes