squidpy.im.ImageContainer.show

ImageContainer.show(layer=None, library_id=None, channel=None, channelwise=False, segmentation_layer=None, segmentation_alpha=0.75, transpose=None, ax=None, figsize=None, dpi=None, save=None, **kwargs)[source]

Show an image within this container.

Parameters:
  • layer (str | None) – Image layer in img that should be processed. If None and only 1 layer is present, it will be selected.

  • library_id (str | Sequence[str] | None) – Name of Z-dimension to plot. In None, plot all Z-dimensions as separate images.

  • channel (int | Sequence[int] | None) – Channels to plot. If None, use all channels.

  • channelwise (bool) – Whether to plot each channel separately or not.

  • segmentation_layer (str | None) – Segmentation layer to plot over each ax.

  • segmentation_alpha (float) – Alpha value for segmentation_layer.

  • transpose (bool | None) – Whether to plot Z-dimensions in columns or in rows. If None, it will be set to not channelwise.

  • ax (Axes | None) – Optional matplotlib axes where to plot the image. If not None, save, figsize and dpi have no effect.

  • figsize (tuple[float, float] | None) – Size of the figure in inches.

  • dpi (int | None) – Dots per inch.

  • save (str | Path | None) – Whether to save the plot.

  • kwargs (Any) – Keyword arguments for matplotlib.axes.Axes.imshow().

Return type:

None

Returns:

: Nothing, just plots the figure and optionally saves the plot.

Raises:

ValueError – If number of supplied axes is different than the number of requested Z-dimensions or channels.