René's URL Explorer Experiment


Title: Time response plot improvements by murrayrm · Pull Request #1018 · python-control/python-control · GitHub

Open Graph Title: Time response plot improvements by murrayrm · Pull Request #1018 · python-control/python-control

X Title: Time response plot improvements by murrayrm · Pull Request #1018 · python-control/python-control

Description: This PR makes improvements to the code for plotting time responses, building on some of the improvements made for frequency response plots (#1011): Fix up the ax keyword processing to allow arrays or lists + uniform processing for all (time and frequency) plot routines. Slight refactoring of code to put common functions in ctrlplot.py (additional changes coming in future PR to further consolidate common code) Allow time responses for multiple systems with common time vector and inputs. This enables commands like ct.step_response([sys1, sys2]).plot to find a single time interval (before you had to call step_response twice and could get different default time intervals). Fix sequential plotting so that different colors are used and plot title is updated (like Bode and Nyquist). Allow label keyword in various time response commands to override default label generation. Allow legends to be turned on and off using show_legend keyword. Added a file examples/plot_gallery.py that generates a PDF file with some standard plots to compare changes in basic plotting between PRs and releases. To get a sense of the differences, consider the following code: sys_mimo1 = ct.tf2ss( [[[1], [0.1]], [[0.2], [1]]], [[[1, 0.6, 1], [1, 1, 1]], [[1, 0.4, 1], [1, 2, 1]]], name="sys_mimo1") sys_mimo2 = ct.tf2ss( [[[1], [0.1]], [[0.2], [1]]], [[[1, 0.2, 1], [1, 24, 22, 5]], [[1, 4, 16, 21], [1, 0.1]]], name="sys_mimo2") ct.step_response(sys_mimo1).plot() ct.step_response(sys_mimo2).plot() Prior to this PR, the output from this code was Note the fact that both responses are in the same color. With this PR, the output becomes Furthermore, you can compute a single time range using the command ct.step_response([sys_mimo1, sys_mimo2]) which gives a single time range for both systems:

Open Graph Description: This PR makes improvements to the code for plotting time responses, building on some of the improvements made for frequency response plots (#1011): Fix up the ax keyword processing to allow arrays...

X Description: This PR makes improvements to the code for plotting time responses, building on some of the improvements made for frequency response plots (#1011): Fix up the ax keyword processing to allow arrays...

Opengraph URL: https://github.com/python-control/python-control/pull/1018

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:86c469e5-57d8-78c4-19bc-3021926f06a3
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB638:3C7D23:1854793:211693F:697A9A03
html-safe-nonce15380a9c9036a3feb3bfdc31fdd82cce2b17c65d84d1e0ae78f8245d937466fc
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjM4OjNDN0QyMzoxODU0NzkzOjIxMTY5M0Y6Njk3QTlBMDMiLCJ2aXNpdG9yX2lkIjoiODg0MDEyMTI4MzQ4NDc1MjM4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac166ea4788ae386cbeedc502e148616439d959a03da7615682261337d00d6ee84
hovercard-subject-tagpull_request:1945696916
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python-control/python-control/pull/1018/files
twitter:imagehttps://avatars.githubusercontent.com/u/293362?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/293362?s=400&v=4
og:image:altThis PR makes improvements to the code for plotting time responses, building on some of the improvements made for frequency response plots (#1011): Fix up the ax keyword processing to allow arrays...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonef73c0dfa17dfe2bc934284d1387c1cedefe723d2133ede564feefd2cbeb98e55
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python-control/python-control git https://github.com/python-control/python-control.git
octolytics-dimension-user_id2285872
octolytics-dimension-user_loginpython-control
octolytics-dimension-repository_id22791752
octolytics-dimension-repository_nwopython-control/python-control
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id22791752
octolytics-dimension-repository_network_root_nwopython-control/python-control
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release58b9322bb0d01c6949be2239e39780fa702e604c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python-control/python-control/pull/1018/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-control%2Fpython-control%2Fpull%2F1018%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-control%2Fpython-control%2Fpull%2F1018%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python-control%2Fpython-control
Reloadhttps://github.com/python-control/python-control/pull/1018/files
Reloadhttps://github.com/python-control/python-control/pull/1018/files
Reloadhttps://github.com/python-control/python-control/pull/1018/files
python-control https://github.com/python-control
python-controlhttps://github.com/python-control/python-control
Notifications https://github.com/login?return_to=%2Fpython-control%2Fpython-control
Fork 447 https://github.com/login?return_to=%2Fpython-control%2Fpython-control
Star 2k https://github.com/login?return_to=%2Fpython-control%2Fpython-control
Code https://github.com/python-control/python-control
Issues 87 https://github.com/python-control/python-control/issues
Pull requests 8 https://github.com/python-control/python-control/pulls
Discussions https://github.com/python-control/python-control/discussions
Actions https://github.com/python-control/python-control/actions
Projects 0 https://github.com/python-control/python-control/projects
Wiki https://github.com/python-control/python-control/wiki
Security 0 https://github.com/python-control/python-control/security
Insights https://github.com/python-control/python-control/pulse
Code https://github.com/python-control/python-control
Issues https://github.com/python-control/python-control/issues
Pull requests https://github.com/python-control/python-control/pulls
Discussions https://github.com/python-control/python-control/discussions
Actions https://github.com/python-control/python-control/actions
Projects https://github.com/python-control/python-control/projects
Wiki https://github.com/python-control/python-control/wiki
Security https://github.com/python-control/python-control/security
Insights https://github.com/python-control/python-control/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython-control%2Fpython-control%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython-control%2Fpython-control%2Fissues%2Fnew%2Fchoose
murrayrmhttps://github.com/murrayrm
python-control:mainhttps://github.com/python-control/python-control/tree/main
murrayrm:timeresp_improvements-01Jun2024https://github.com/murrayrm/python-control/tree/timeresp_improvements-01Jun2024
Conversation 13 https://github.com/python-control/python-control/pull/1018
Commits 12 https://github.com/python-control/python-control/pull/1018/commits
Checks 0 https://github.com/python-control/python-control/pull/1018/checks
Files changed https://github.com/python-control/python-control/pull/1018/files
Please reload this pagehttps://github.com/python-control/python-control/pull/1018/files
Time response plot improvements https://github.com/python-control/python-control/pull/1018/files#top
Show all changes 12 commits https://github.com/python-control/python-control/pull/1018/files
95326b0 initial pass at defining lists of systems for time responses murrayrm Jun 4, 2024 https://github.com/python-control/python-control/pull/1018/commits/95326b0f0bea204f91901a6fd9db2d2a8e9917cd
3732217 use _process_ax_keyword in time_response_plot murrayrm Jun 16, 2024 https://github.com/python-control/python-control/pull/1018/commits/373221787c9a27275069952b6f2c25367aae975a
44123c9 refactoring to put common functions in ctrlplot.py murrayrm Jun 16, 2024 https://github.com/python-control/python-control/pull/1018/commits/44123c9d969c1d6738986dd3ed29e909cbb6f3f5
8b416eb Add list of systems functionality to time response functions murrayrm Jun 18, 2024 https://github.com/python-control/python-control/pull/1018/commits/8b416eb82c6bca1278351677c3740838dad2bcf3
6be8f48 allow combining I/O time responses with different numbers of states murrayrm Jun 20, 2024 https://github.com/python-control/python-control/pull/1018/commits/6be8f4811804d720dec0b61ebf98de61912139bc
8b269bf add plot_gallery to compare plotting results between builds murrayrm Jun 20, 2024 https://github.com/python-control/python-control/pull/1018/commits/8b269bfd5d92a1bf5705f40196c9043736a86c80
cc6aeb6 improved unit tests for rcParams + small fix to suptitle rcParams murrayrm Jun 20, 2024 https://github.com/python-control/python-control/pull/1018/commits/cc6aeb612c76dd8544589685c236e7ddfaf012ba
ed8a1c1 allow label keyword to override generated labels murrayrm Jun 25, 2024 https://github.com/python-control/python-control/pull/1018/commits/ed8a1c18e112556978edeb508da114e9b5ce7321
92d36cc cleanup after plotting in test functions murrayrm Jun 26, 2024 https://github.com/python-control/python-control/pull/1018/commits/92d36cc80c9796ddd79dd9b9cbf9091b8ffed2ac
8f0c227 add CDS 110 example notebook demonstrating features murrayrm Jun 26, 2024 https://github.com/python-control/python-control/pull/1018/commits/8f0c2272a441c5b3300aa2b69eac514412456ce6
d459569 add show_legend processing murrayrm Jun 29, 2024 https://github.com/python-control/python-control/pull/1018/commits/d459569267d5a47de0b78465cdc280916d4a95a1
10f009b address @slivingston review comments murrayrm Jul 7, 2024 https://github.com/python-control/python-control/pull/1018/commits/10f009b76ffbffe647b9e6582c6075fae5b5cfd6
Clear filters https://github.com/python-control/python-control/pull/1018/files
Please reload this pagehttps://github.com/python-control/python-control/pull/1018/files
Please reload this pagehttps://github.com/python-control/python-control/pull/1018/files
ctrlplot.py https://github.com/python-control/python-control/pull/1018/files#diff-634119b78de5d79475df039710a7b5e4a011957bc2b311821a51479b1d9bcb64
frdata.py https://github.com/python-control/python-control/pull/1018/files#diff-cacf59417131c19becd6fba4dde9e979bed49ce572eb24f0f62bd2af460d83d1
freqplot.py https://github.com/python-control/python-control/pull/1018/files#diff-a751fe1009e7b656d19357a39abb58dd88b89052c9d9259c3393a4648b697a16
nlsys.py https://github.com/python-control/python-control/pull/1018/files#diff-5ae9b973ef43076c51927f314e400ffc76cef00009ba1f343c83c53bd12a9d99
kwargs_test.py https://github.com/python-control/python-control/pull/1018/files#diff-3144c3ea9a838756fe63a094bb84c293d32c5190d9b081cbb2f10926fda2e19e
timeplot_test.py https://github.com/python-control/python-control/pull/1018/files#diff-6a65c7ec317ec72929a098855d7d948c942c726aa0907890b0a02ea124869c0f
timeplot.py https://github.com/python-control/python-control/pull/1018/files#diff-6208d7a27459381a4957ba5445cd6e98154209ecde7cb2271bc40f7b7b99b931
timeresp.py https://github.com/python-control/python-control/pull/1018/files#diff-3200453f1cf62f183f04dbf39d1129d91245c53a9f74675cee6bd384351c45b4
conventions.rst https://github.com/python-control/python-control/pull/1018/files#diff-04f5af9adedfe548dc7beedc5952a1aff00fb279a868e337028b2487e655e2f4
plotting.rst https://github.com/python-control/python-control/pull/1018/files#diff-7d87c42933f69063b454fa6021951255b0061c5f7c39c347e2d0887078dc9c2a
cds110_lti-systems.ipynb https://github.com/python-control/python-control/pull/1018/files#diff-a3e5619f6b6b4d2caca0773a64b3150d2018b70cb050d1522c5d05b3d69cef3a
plot_gallery.py https://github.com/python-control/python-control/pull/1018/files#diff-ef5dc8c130330b8e4ed61b7deca92a5e974930a8e4fb1431cb00d541469b6823
springmass-coupled.png https://github.com/python-control/python-control/pull/1018/files#diff-6da39ddd98dc2959e412f62037fe7977070418b4d235219192db3e8722b72d34
control/ctrlplot.pyhttps://github.com/python-control/python-control/pull/1018/files#diff-634119b78de5d79475df039710a7b5e4a011957bc2b311821a51479b1d9bcb64
View file https://github.com/murrayrm/python-control/blob/10f009b76ffbffe647b9e6582c6075fae5b5cfd6/control/ctrlplot.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-control/python-control/pull/1018/{{ revealButtonHref }}
https://github.com/python-control/python-control/pull/1018/files#diff-634119b78de5d79475df039710a7b5e4a011957bc2b311821a51479b1d9bcb64
https://github.com/python-control/python-control/pull/1018/files#diff-634119b78de5d79475df039710a7b5e4a011957bc2b311821a51479b1d9bcb64
https://github.com/python-control/python-control/pull/1018/files#diff-634119b78de5d79475df039710a7b5e4a011957bc2b311821a51479b1d9bcb64
https://github.com/python-control/python-control/pull/1018/files#diff-634119b78de5d79475df039710a7b5e4a011957bc2b311821a51479b1d9bcb64
https://github.com/python-control/python-control/pull/1018/files#diff-634119b78de5d79475df039710a7b5e4a011957bc2b311821a51479b1d9bcb64
control/frdata.pyhttps://github.com/python-control/python-control/pull/1018/files#diff-cacf59417131c19becd6fba4dde9e979bed49ce572eb24f0f62bd2af460d83d1
View file https://github.com/murrayrm/python-control/blob/10f009b76ffbffe647b9e6582c6075fae5b5cfd6/control/frdata.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-control/python-control/pull/1018/{{ revealButtonHref }}
https://github.com/python-control/python-control/pull/1018/files#diff-cacf59417131c19becd6fba4dde9e979bed49ce572eb24f0f62bd2af460d83d1
https://github.com/python-control/python-control/pull/1018/files#diff-cacf59417131c19becd6fba4dde9e979bed49ce572eb24f0f62bd2af460d83d1
control/freqplot.pyhttps://github.com/python-control/python-control/pull/1018/files#diff-a751fe1009e7b656d19357a39abb58dd88b89052c9d9259c3393a4648b697a16
View file https://github.com/murrayrm/python-control/blob/10f009b76ffbffe647b9e6582c6075fae5b5cfd6/control/freqplot.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-control/python-control/pull/1018/{{ revealButtonHref }}
https://github.com/python-control/python-control/pull/1018/files#diff-a751fe1009e7b656d19357a39abb58dd88b89052c9d9259c3393a4648b697a16
https://github.com/python-control/python-control/pull/1018/files#diff-a751fe1009e7b656d19357a39abb58dd88b89052c9d9259c3393a4648b697a16
https://github.com/python-control/python-control/pull/1018/files#diff-a751fe1009e7b656d19357a39abb58dd88b89052c9d9259c3393a4648b697a16
https://github.com/python-control/python-control/pull/1018/files#diff-a751fe1009e7b656d19357a39abb58dd88b89052c9d9259c3393a4648b697a16
https://github.com/python-control/python-control/pull/1018/files#diff-a751fe1009e7b656d19357a39abb58dd88b89052c9d9259c3393a4648b697a16
https://github.com/python-control/python-control/pull/1018/files#diff-a751fe1009e7b656d19357a39abb58dd88b89052c9d9259c3393a4648b697a16
https://github.com/python-control/python-control/pull/1018/files#diff-a751fe1009e7b656d19357a39abb58dd88b89052c9d9259c3393a4648b697a16
control/nlsys.pyhttps://github.com/python-control/python-control/pull/1018/files#diff-5ae9b973ef43076c51927f314e400ffc76cef00009ba1f343c83c53bd12a9d99
View file https://github.com/murrayrm/python-control/blob/10f009b76ffbffe647b9e6582c6075fae5b5cfd6/control/nlsys.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-control/python-control/pull/1018/{{ revealButtonHref }}
https://github.com/python-control/python-control/pull/1018/files#diff-5ae9b973ef43076c51927f314e400ffc76cef00009ba1f343c83c53bd12a9d99
https://github.com/python-control/python-control/pull/1018/files#diff-5ae9b973ef43076c51927f314e400ffc76cef00009ba1f343c83c53bd12a9d99
https://github.com/python-control/python-control/pull/1018/files#diff-5ae9b973ef43076c51927f314e400ffc76cef00009ba1f343c83c53bd12a9d99
https://github.com/python-control/python-control/pull/1018/files#diff-5ae9b973ef43076c51927f314e400ffc76cef00009ba1f343c83c53bd12a9d99
https://github.com/python-control/python-control/pull/1018/files#diff-5ae9b973ef43076c51927f314e400ffc76cef00009ba1f343c83c53bd12a9d99
https://github.com/python-control/python-control/pull/1018/files#diff-5ae9b973ef43076c51927f314e400ffc76cef00009ba1f343c83c53bd12a9d99
control/tests/kwargs_test.pyhttps://github.com/python-control/python-control/pull/1018/files#diff-3144c3ea9a838756fe63a094bb84c293d32c5190d9b081cbb2f10926fda2e19e
View file https://github.com/murrayrm/python-control/blob/10f009b76ffbffe647b9e6582c6075fae5b5cfd6/control/tests/kwargs_test.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-control/python-control/pull/1018/{{ revealButtonHref }}
https://github.com/python-control/python-control/pull/1018/files#diff-3144c3ea9a838756fe63a094bb84c293d32c5190d9b081cbb2f10926fda2e19e
https://github.com/python-control/python-control/pull/1018/files#diff-3144c3ea9a838756fe63a094bb84c293d32c5190d9b081cbb2f10926fda2e19e
Please reload this pagehttps://github.com/python-control/python-control/pull/1018/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.