Skip to content

Regression: root-locus plots may be coarse, and no longer react to zoom events #1151

Description

@repagh

Root-locus (and sisotool root-locus) used to recompute their points when zooming in on the root-locus plot (typically to get to the dominant pole group). At zoom-in, the new xlim and ylim are used to recompute the RL lines.

Currently root-locus does not recompute, and zoomed-in plots show (sometimes unusably) coarse edgy root-locuses. The recompute was removed in commit

57dac87da3c5885ef4912fa4484a0dff811e0b9c    Initial refactoring of root_locus_{map,plot}

I am currently trying to figure out how to bring recalculation of the plot back.

Example:

import control.matlab as ml
from matplotlib import pyplot as plt

s = ml.tf('s')
H = (s+1)/s**2/(s**2+2*s+7)/(s+15)
ml.rlocus(H)
plt.show()

Image

Activity

  1. murrayrm commented on Jun 5, 2025

    @murrayrm
    Member

    Thanks for pointing this out @repagh. I remember getting rid of that function because I wasn't able to get it to work with the new structure. In particular, when we separated out the computation of the response from the plotting of that response, it didn't seem easy to go back and generate more detail. But there may be a way to have a response function have a callback to regenerate the plot with new resolution, then pass that information on via the response object so that a plotting function can do this same.

    This might be a good time to think about interactive plots in general and start putting in some generic mechanisms. I think it should always be possible to hover/clock on the graph and have something useful happen (eg, hovering or clicking on a point on a Bode plot would show the frequency, magnitude, and phase at that point).

  2. added theissue type on Jun 6, 2025
  3. sawyerbfuller commented on Jun 10, 2025

    @sawyerbfuller
    Contributor

    Showing where the calculated points are when you hover over them in interactive mode would be particularly helpful in root locus plots because you can only click on the points.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions