Title: Improvements to Nichols chart plotting by roryyorke · Pull Request #723 · python-control/python-control · GitHub
Open Graph Title: Improvements to Nichols chart plotting by roryyorke · Pull Request #723 · python-control/python-control
X Title: Improvements to Nichols chart plotting by roryyorke · Pull Request #723 · python-control/python-control
Description: These are relatively minor updates to the Nichols chart (AKA grid) plotting. It's far from ideal; further possible improvements: more tightly fitting the chart to the view (or data) xlim and ylim (the "extent"); the pain here is figuring out which contours to plot, and where to place the labels depending on the limits, some contours will end up with a two visible segments recreating the axis on zoom and pan events this might not be too difficult; Axes support 'xlim_changed' and 'ylim_changed' events a deluxe version of this would be too add (secondary?) axes, and show the closed-loop gain and phase in the "data value" text (the "x= , y = " on the Matplotlib toolbar) I wonder if we could use a custom ContourSets, and plug into however that labelling is done? 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: check for "tight" phase limits (see first example below) check that the axes child text elements are have clip_on (I'd have to not check title & tick labels, presume this is possible) check for existence of phase labels, contingent on label_cl_phases flag test both branches of the if in _inner_extents, and in fact test the behaviour in general by setting xlim & ylim before calling nichols_grid. Please suggest other 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 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.
Open Graph Description: These are relatively minor updates to the Nichols chart (AKA grid) plotting. It's far from ideal; further possible improvements: more tightly fitting the chart to the view (or data) xlim and y...
X Description: These are relatively minor updates to the Nichols chart (AKA grid) plotting. It's far from ideal; further possible improvements: more tightly fitting the chart to the view (or data) xlim a...
Opengraph URL: https://github.com/python-control/python-control/pull/723
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:079a7c16-f2c3-0c67-dd40-1c7d4b699a0a |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | 82F2:19690:1CFF72F:2541DA6:697E1EB9 |
| html-safe-nonce | 9da0c8d38a21adb9b48c6d9033ff6cb3d5c530fb9acbb8c9527a3ef8e6530a3e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MkYyOjE5NjkwOjFDRkY3MkY6MjU0MURBNjo2OTdFMUVCOSIsInZpc2l0b3JfaWQiOiI2MjQ4NjgxNDM0NjI2NTMxMDAxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 975104c9031c7e1ed093f444788a47d9c705142f260e65be0a554bfc8b1888cd |
| hovercard-subject-tag | pull_request:911276517 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python-control/python-control/pull/723/checks |
| twitter:image | https://avatars.githubusercontent.com/u/110974?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/110974?s=400&v=4 |
| og:image:alt | These are relatively minor updates to the Nichols chart (AKA grid) plotting. It's far from ideal; further possible improvements: more tightly fitting the chart to the view (or data) xlim and y... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-control/python-control git https://github.com/python-control/python-control.git |
| octolytics-dimension-user_id | 2285872 |
| octolytics-dimension-user_login | python-control |
| octolytics-dimension-repository_id | 22791752 |
| octolytics-dimension-repository_nwo | python-control/python-control |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 22791752 |
| octolytics-dimension-repository_network_root_nwo | python-control/python-control |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width