GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||
GeezerVison is showing github.com — Improvements to Nichols chart plotting by roryyorke · Pull Request #723 · python-control/python-control Conversation
Contributor
These are relatively minor updates to the Nichols chart (AKA grid) plotting. It's far from ideal; further possible improvements:
Here are some before-and-after pictures (left is before) of a few example systems. The new code gives a better result in almost all respects. One visible problem is that the closed-loop phase label for "0°" clashes with the "-40dB" (and similar) closed-loop gain label. The gains become crowded when the gain span is large (final figure), but that is the same in both versions. I haven't added tests; I'll see how much time I have to do that. Easyish tests:
Details (commit message)Clip closed-loop contour labels. Add labels for constant closed-loop phase contours. Use smaller of data or view extents when deciding on how big, in Use more uniformly spaced closed-loop phase contours, and use more Add optional
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsClip closed-loop contour labels. Add labels for constant closed-loop phase contours. Use smaller of data or view extents when deciding on how big, in phase, a chart to create. Use more uniformly spaced closed-loop phase contours, and use more widely-spaced contours when phase extent is large. Add optional `ax` argument, for axes to add grid to.
|
There was an error while loading. Please reload this page.
|
Coverage increased (+0.1%) to 94.31% when pulling 59cd872 on roryyorke:rory/nichols-improvements into 2102181 on python-control:master. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Changes look good. It might be worth adding some unit tests to cover the new features (eg, use of |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
OK, I'll look at some tests, including testing the I'll probably wrap up the linfnorm PR first, and I'm not sure when I'll get this PR done. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I changed nichols_grid to return the artists it adds; this made testing much easier, but also makes it possible to customize the grid appearance and labels. Below is a not-especially-compelling example; more realistically one might change the intensity or alpha of the grid and labels. plt.clf() mc,nc,ml,nl = ct.nichols_grid() for i,(c,l) in enumerate(zip(nc,nl)): nc.set_color(f'C{i}') nl.set_color(f'C{i}') for i,(c,l) in enumerate(zip(mc,ml)): c.set_color(f'C{i}') l.set_color(f'C{i}') |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
This looks good to go to me. @roryyorke: any additional changes that you plan to make? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
No, all done.
…On Sat, 30 Apr 2022, 07:05 Richard Murray, ***@***.***> wrote:
This looks good to go to me. @roryyorke <https://github.com/roryyorke>:
any additional changes that you plan to make?
—
Reply to this email directly, view it on GitHub
<#723 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA3C7TMVNROIIOFAL7I2EDVHS5QRANCNFSM5TSN3NBA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.