control.nichols_plot

control.nichols_plot(data, omega=None, *fmt, grid=None, title=None, ax=None, label=None, **kwargs)[source]

Nichols plot for a system.

Plots a Nichols plot for the system over a (optional) frequency range.

Parameters
  • data (list of FrequencyResponseData or LTI) – List of LTI systems or FrequencyResponseData objects. A single system or frequency response can also be passed.

  • omega (array_like) – Range of frequencies (list or bounds) in rad/sec

  • *fmt (matplotlib.pyplot.plot() format string, optional) – Passed to matplotlib as the format string for all lines in the plot. The omega parameter must be present (use omega=None if needed).

  • grid (boolean, optional) – True if the plot should include a Nichols-chart grid. Default is True.

  • **kwargs (matplotlib.pyplot.plot() keyword properties, optional) – Additional keywords passed to matplotlib to specify line properties.

  • ax (matplotlib.axes.Axes, optional) – The matplotlib axes to draw the figure on. If not specified and the current figure has a single axes, that axes is used. Otherwise, a new figure is created.

  • label (str or array_like of str, optional) – If present, replace automatically generated label(s) with given label(s). If sysdata is a list, strings should be specified for each system.

  • legend_loc (int or str, optional) – Include a legend in the given location. Default is ‘upper left’, with no legend for a single response. Use False to suppress legend.

  • rcParams (dict) – Override the default parameters used for generating plots. Default is set by config.default[‘ctrlplot.rcParams’].

  • show_legend (bool, optional) – Force legend to be shown if True or hidden if False. If None, then show legend when there is more than one line on the plot or legend_loc has been specified.

  • title (str, optional) – Set the title of the plot. Defaults to plot type and system name(s).

Returns

cplt

Object containing the data that were plotted:

  • cplt.lines: 1D array of matplotlib.lines.Line2D objects. The size of the array matches the number of systems and the value of the array is a list of Line2D objects for that system.

  • cplt.axes: 2D array of matplotlib.axes.Axes for the plot.

  • cplt.figure: matplotlib.figure.Figure containing the plot.

  • cplt.legend: legend object(s) contained in the plot

See ControlPlot for more detailed information.

lines : array of Line2D

Return type

ControlPlot object