-
Notifications
You must be signed in to change notification settings - Fork 438
Color on each branch of rootlocus #350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think you'd have to write a sorting routine for the computed eigenvalues because for each gain they may not be in the same order as the previous gain. For large steps between gains, I'm not sure if you can sort them, but for small gain steps you can for most cases. It isn't trivial for all bifurcation points though. |
I think this issue is related with this line:
where col seems to be each branch. Indeed, if
I think setting that parameter free would color each branch separatelly. I will check later on. |
I just tried this and it seems to work. Replaced:
with:
Test script:
Would be nice to change the colour of the crosses too. |
I'm not sure what the benefit of the different colours is though. Without a legend or other way of knowing what each line is, what is the benefit? |
Colors might help track where the poles are going.
Does that coloring system still work with more complicated diagrams with
more poles and locus intersections?
Also: we might be able to deprecate matplotlib version < 1 , that happened
probably a decade ago by now : )
Sawyer
On Sat, Aug 7, 2021 at 2:07 PM Bill Tubbs ***@***.***> wrote:
I'm not sure what the benefit of the different colours is though. Without
a legend or other way of knowing what each line is, what is the benefit?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#350 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AN74SSNCVPZ7UETT23OQAZ3T3WOAZANCNFSM4JVV54RQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
--
Sawyer Fuller
Assistant Professor of Mechanical Engineering
Adjunct, Paul G Allen School of Computer Science
University of Washington
http://faculty.washington.edu/~minster/
(Typed with my thumbs)
|
One time when different colours per locus might be a bad idea, is when plotting the root loci of more than one system on the same plot. Is this actually useful or something that we want to support? If so, we could offer both options. |
I like the colored branches. I had what I thought was an example where it
might fail, but I couldn’t find it.
Re multiple rloci: i think it would be good provide some sort of an
optional color-sequence argument. Which you would just set to a single
color if desired, or to your own color sequence. I think matplotlib has
features to do this, but I don’t know what it is called. S
On Sun, Aug 15, 2021 at 7:12 AM Bill Tubbs ***@***.***> wrote:
One time when different colours per locus might be a bad idea, is when
plotting the root loci of more than one system on the same plot. Is this
actually useful or something that we want to support? If so, we could offer
both options.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#350 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AN74SSIK4Z5XZ7CBFFIMN2LT47DKHANCNFSM4JVV54RQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
--
Sawyer Fuller
Assistant Professor of Mechanical Engineering
Adjunct, Paul G Allen School of Computer Science
University of Washington
http://faculty.washington.edu/~minster/
(Typed with my thumbs)
|
When using the rootlocus function the plot containing all the branches does not differentiate between branches. All of them are colored with the same blue.
I found a walkthrough for this, but you need to know well the transfer function you want to plot, like:
system=control.tf([1],np.convolve(np.polyadd(np.convolve([1,1],[1,1]),4),np.polyadd(np.convolve([1,3],[1,3]),4))) control.root_locus(system) plt.gca().get_lines()[1].set_color('b') plt.gca().get_lines()[2].set_color('r') plt.gca().get_lines()[3].set_color('g') plt.gca().get_lines()[4].set_color('m')
Where poles are the line [0], and the rest are the different branches. If you have zeros, then they are located in line[1], and the branches in [2],...
Is there any possibilty of colouring the different branches as MATLAB does?
Thank you for this module, I found it very useful!
The text was updated successfully, but these errors were encountered: