Errors and Type Aliases#

Error Handling#

Public exceptions are available from plotez.errors.

Base Exceptions#

class plotez.errors.PlotEZError[source]#

Bases: Exception

Base class for exceptions related to plotting operations.

class plotez.errors.DataError[source]#

Bases: PlotEZError

Base class for data-related plotting errors.

class plotez.errors.ConfigurationError[source]#

Bases: PlotEZError

Base class for plot configuration and parameter errors.

class plotez.errors.OrientationError[source]#

Bases: PlotEZError

Raised when an invalid or unexpected plot orientation is used.

Data Exceptions#

class plotez.errors.ShapeError[source]#

Bases: DataError

Raised when an array has an unexpected or incompatible shape.

class plotez.errors.DataLengthError[source]#

Bases: DataError

Raised when arrays that must align have incompatible lengths.

class plotez.errors.EmptyDataError[source]#

Bases: DataError

Raised when required primary x or y data is empty.

class plotez.errors.ColumnCountError[source]#

Bases: DataError

Raised when a data file does not contain exactly two columns.

Configuration Exceptions#

class plotez.errors.AxisLabelError[source]#

Bases: ConfigurationError

Raised when axis_labels does not contain exactly three elements.

class plotez.errors.TwinXDataError[source]#

Bases: ConfigurationError

Raised when x2_data is supplied for a dual-Y-axis plot.

class plotez.errors.TwinYDataError[source]#

Bases: ConfigurationError

Raised when y2_data is supplied for a dual-X-axis plot.

class plotez.errors.XArrayNot1D[source]#

Bases: ConfigurationError

Raised when the x dimension of a data array is not one-dimensional.

class plotez.errors.YArrayNot1D[source]#

Bases: ConfigurationError

Raised when the y dimension of a data array is not one-dimensional.

Type Aliases#

Note

AxesReturn describes single- and dual-axis plotting results: Axes | tuple[Axes, Axes]. Grid functions such as n_plotter and two_subplots return a shaped NDArray of Axes directly.

Type aliases used throughout PlotEZ.

Public aliases#

Name

Description

NDArray

Re-export of numpy.ndarray but as a typehint – any array-like input accepted by NumPy.

AxesReturn

Axes | tuple[Axes, Axes] – return type for single- and dual-axis plot functions. Grid functions (n_plotter, two_subplots) return a shaped NDArray of Axes directly.