scallops.visualize.imshow.imshow_plane

scallops.visualize.imshow.imshow_plane(image, ax=None, title=None, **kwargs)

Plot a 2-d image array from an image stack. If ax is passed, the function will be plotted in the provided axis. Additional kwargs are passed to plt.imshow().

Parameters:
  • image (ndarray | DataArray) – 2-d image array from an image stack to plot.

  • ax (None | Axes) – Axes to plot on. If not passed, defaults to the current axes.

  • title (None | str) – Title to assign the Axes being plotted on.

  • kwargs – Additional keyword arguments to pass to plt.imshow.

Returns:

The matplotlib Axes containing the plot.

Example:
import numpy as np
import matplotlib.pyplot as plt
from scallops.visualize.imshow import imshow_plane

# Generate a synthetic 2D image array
image_array = np.random.rand(512, 512)

# Plot the image using imshow_plane
fig, ax = plt.subplots()
imshow_plane(image_array, ax=ax, title="Synthetic Image", cmap="viridis")

plt.show()
Return type:

Axes