plot_array

nrv.eit.utils.plot_array(ax: Axes, x: ndarray, arr: ndarray, axis: int | None = None, **kwgs)[source]

Plot a one-dimensional coordinate against an array of arbitrary dimension.

Parameters:
  • ax (matplotlib.axes.Axes) – Target axes.

  • x (np.ndarray) – Coordinate vector used on the x-axis.

  • arr (np.ndarray) – Values to plot. If multidimensional, every slice orthogonal to axis is plotted recursively.

  • axis (int | None, optional) – Axis of arr matching x. If omitted, it is inferred from the first matching dimension length.

  • **kwgs (dict) – Additional plotting keyword arguments forwarded to Axes.plot.