visualize_figure_array_converterPixelObject

PixelObject

class visualize._figure_array_converter.PixelObject(extent, ax=None, array=None)

Dataclass to hold pixel information from either a matplotlib.pyplot.Axes or a numpy array.

Parameters:
  • extent (list) – The extent of the plot.

  • ax (matplotlib.pyplot.Axes) – The axis to convert to a pixel array. Default is None.

  • array (numpy.ndarray) – The pixel array to store. Default is None.

Attributes:

extent

The extent of the plot.

Type:

list

array

The pixel array of the plot.

Type:

numpy.ndarray

Raises:
  • ValueError – If neither an ax nor an array is specified.

  • ValueError – If both an ax and an array are specified