control.pole_zero_plot(data, plot=None, grid=None, title=None, marker_color=None, marker_size=None, marker_width=None, legend_loc='upper right', xlim=None, ylim=None, interactive=None, ax=None, scaling=None, initial_gain=None, **kwargs)[source]

Plot a pole/zero map for a linear system.

If the system data include root loci, a root locus diagram for the system is plotted. When the root locus for a single system is plotted, clicking on a location on the root locus will mark the gain on all branches of the diagram and show the system gain and damping for the given pole in the axes title. Set to False to turn off this behavior.

  • sysdata (List of PoleZeroData objects or LTI systems) – List of pole/zero response data objects generated by pzmap_response() or rootlocus_response() that are to be plotted. If a list of systems is given, the poles and zeros of those systems will be plotted.

  • grid (bool or str, optional) – If True plot omega-damping grid, if False show imaginary axis for continuous time systems, unit circle for discrete time systems. If empty, do not draw any additonal lines. Default value is set by config.default[‘pzmap.grid’] or config.default[‘rlocus.grid’].

  • plot (bool, optional) – (legacy) If True a graph is generated with Matplotlib, otherwise the poles and zeros are only computed and returned. If this argument is present, the legacy value of poles and zeros is returned.

  • scaling (str or list, optional) – Set the type of axis scaling. Can be ‘equal’ (default), ‘auto’, or a list of the form [xmin, xmax, ymin, ymax].

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

  • marker_color (str, optional) – Set the color of the markers used for poles and zeros.

  • marker_size (int, optional) – Set the size of the markers used for poles and zeros.

  • marker_width (int, optional) – Set the line width of the markers used for poles and zeros.

  • legend_loc (str, optional) – For plots with multiple lines, a legend will be included in the given location. Default is ‘center right’. Use False to supress.

  • xlim (list, optional) – Set the limits for the x axis.

  • ylim (list, optional) – Set the limits for the y axis.

  • interactive (bool, optional) – Turn off interactive mode for root locus plots.

  • initial_gain (float, optional) – If given, the specified system gain will be marked on the plot.


  • lines (array of list of Line2D) – Array of Line2D objects for each set of markers in the plot. The shape of the array is given by (nsys, 2) where nsys is the number of systems or responses passed to the function. The second index specifies the pzmap object type:

    • lines[idx, 0]: poles

    • lines[idx, 1]: zeros

  • poles, zeros (list of arrays) – (legacy) If the plot keyword is given, the system poles and zeros are returned.


By default, the pzmap function calls matplotlib.pyplot.axis(‘equal’), which means that trying to reset the axis limits may not behave as expected. To change the axis limits, use the scaling keyword of use matplotlib.pyplot.gca().axis(‘auto’) and then set the axis limits to the desired values.