You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Regression: root-locus plots may be coarse, and no longer react to zoom events #1151
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()
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).
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.
Activity
murrayrm commentedon Jun 5, 2025
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).
sawyerbfuller commentedon Jun 10, 2025
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.