pybop.plot.nyquist#

Functions#

nyquist(problem[, inputs, show, title, backend, ...])

Generates Nyquist plots for the given problem by evaluating the model's output and target values.

Module Contents#

pybop.plot.nyquist.nyquist(problem, inputs: pybop.parameters.parameter.Inputs = None, show=True, title='Nyquist Plot', backend=None, figures=None, axes=None)[source]#

Generates Nyquist plots for the given problem by evaluating the model’s output and target values.

Parameters:
  • problem (pybop.Problem) – An instance of a problem class that contains the parameters and methods for evaluation and target retrieval.

  • title (str, optional) – The title of the figure

  • inputs (Inputs, optional) – Input parameters for the problem. If not provided, the default parameters from the problem instance will be used. These parameters are verified before use (default is None).

  • show (bool, optional) – If True, the plots will be displayed.

  • backend (str or pybop.plot.backends.PlotBackend, optional) – The plotting backend to be used.

  • figures (figure object or list of figure objects, optional) – Either a single figure or the same number of figures as axes.

  • axes (single axis or list of axes, optional) – plotly: axes expected to be of the form tuple(row, col) Number of axes must agree with number of targets for the problem.

Returns:

fig or list of figs – A single figure or a list of figures containing the Nyquist plots for each target in the problem. If show is True, the figures will be displayed and None will be returned.

Return type:

plotly.graph_objs.Figure or matplotlib.figure.Figure

Notes

  • The function extracts the real part of the impedance from the model’s output and the real and imaginary parts of the impedance from the target output.

  • For each signal in the problem, a Nyquist plot is created with the model’s impedance plotted as a scatter plot.

  • An additional trace for the reference (target output) is added to the plot.

Example

>>> problem = pybop.EISProblem()
>>> nyquist_figures = nyquist(problem, show=True, title="Nyquist Plot", xaxis_title="Real(Z)", yaxis_title="Imag(Z)")
>>> # The plots will be displayed and nyquist_figures will contain the list of figure objects.