René's URL Explorer Experiment


Title: Strange nondeterministic issues when using `phase_plot` with `X`, `Y` and `X0` set · Issue #970 · python-control/python-control · GitHub

Open Graph Title: Strange nondeterministic issues when using `phase_plot` with `X`, `Y` and `X0` set · Issue #970 · python-control/python-control

X Title: Strange nondeterministic issues when using `phase_plot` with `X`, `Y` and `X0` set · Issue #970 · python-control/python-control

Description: I am trying to draw a phase plot with both streamlines and a vector field. Using the inverted pendulum ODE from https://python-control.readthedocs.io/en/latest/phaseplots.html, I put together the following script: import numpy as np impo...

Open Graph Description: I am trying to draw a phase plot with both streamlines and a vector field. Using the inverted pendulum ODE from https://python-control.readthedocs.io/en/latest/phaseplots.html, I put together the f...

X Description: I am trying to draw a phase plot with both streamlines and a vector field. Using the inverted pendulum ODE from https://python-control.readthedocs.io/en/latest/phaseplots.html, I put together the f...

Opengraph URL: https://github.com/python-control/python-control/issues/970

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Strange nondeterministic issues when using `phase_plot` with `X`, `Y` and `X0` set","articleBody":"I am trying to draw a phase plot with both streamlines and a vector field. Using the inverted pendulum ODE from https://python-control.readthedocs.io/en/latest/phaseplots.html, I put together the following script:\r\n```python\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nfrom control.phaseplot import phase_plot\r\n\r\n# Define the ODEs for a damped (inverted) pendulum\r\ndef invpend_ode(x, t, m=1., l=1., b=0.2, g=1):\r\n    return x[1], -b/m*x[1] + (g*l/m)*np.sin(x[0])\r\n\r\n# Set up the figure the way we want it to look\r\nplt.figure()\r\nplt.title('Inverted pendulum')\r\n\r\n# Outer trajectories\r\nphase_plot(\r\n    invpend_ode,\r\n    X=(-10, 10, 20),\r\n    Y=(-10, 10, 20),\r\n    X0=[[-2*np.pi, 1.6], [-2*np.pi, 0.5], [-1.8, 2.1],\r\n        [-1, 2.1], [4.2, 2.1], [5, 2.1],\r\n        [2*np.pi, -1.6], [2*np.pi, -0.5], [1.8, -2.1],\r\n        [1, -2.1], [-4.2, -2.1], [-5, -2.1]]\r\n)\r\n\r\nplt.show()\r\n```\r\n\r\nI would have expected this to plot a simple vector field with a grid of 20*20 arrows and streamlines from the given inital conditions. Instead, each time I run this I get a different malformed plot, often with at least one axis somehow having arrows at values like 10^281. Various RuntimeWarnings about overflow are also sometimes printed in the console. Some examples of the plots I have gotten:\r\n\r\n![image](https://github.com/python-control/python-control/assets/5256211/cd64a25d-a389-4ee7-b90f-a9ff62d0d78d)\r\n![image](https://github.com/python-control/python-control/assets/5256211/753939bd-bc6a-4066-a2d4-3b6763f86d33)\r\n![image](https://github.com/python-control/python-control/assets/5256211/d6f05d7f-644c-4422-ad6d-c524be9fb18d)\r\n![image](https://github.com/python-control/python-control/assets/5256211/688dcb8a-ec0f-4a00-98ef-38f28ba0a3df)\r\n![image](https://github.com/python-control/python-control/assets/5256211/6f498b69-9ea1-4e07-b3dd-89e75793c34d)\r\n\r\nThis does not seem like expected behaviour. What is going on here?\r\n\r\nTested on Windows 10 with Python 3.10.11, matplotlib 3.8.2 and control 0.9.4 from pip.","author":{"url":"https://github.com/FeldrinH","@type":"Person","name":"FeldrinH"},"datePublished":"2024-02-13T23:57:59.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/970/python-control/issues/970"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:89570977-0926-a351-7318-0766eb98383f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA0A2:1EB0ED:16DDB3:1FF6A7:697B3E74
html-safe-noncec4554ad0adc117d0c3dcf6bd3e0679b6ac4a804ac9dc85fe61959aeee0441ca9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMEEyOjFFQjBFRDoxNkREQjM6MUZGNkE3OjY5N0IzRTc0IiwidmlzaXRvcl9pZCI6IjE2ODc5NTcxODMxNDU5MTgwNjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac099384f0e1750cd618b27eb5444670d13634a31113fe9a45996390b415f17066
hovercard-subject-tagissue:2133321369
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-control/python-control/970/issue_layout
twitter:imagehttps://opengraph.githubassets.com/aad863404e82f980835a1673829442d152efe52d132f63bf231c0322efb98809/python-control/python-control/issues/970
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/aad863404e82f980835a1673829442d152efe52d132f63bf231c0322efb98809/python-control/python-control/issues/970
og:image:altI am trying to draw a phase plot with both streamlines and a vector field. Using the inverted pendulum ODE from https://python-control.readthedocs.io/en/latest/phaseplots.html, I put together the f...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameFeldrinH
hostnamegithub.com
expected-hostnamegithub.com
None6fe64d94889230be19a900846cfc91707e7dd4206878d6c208922b46a6b0735d
turbo-cache-controlno-preview
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release15736a47b83581130a149aa1b928696bea06adde
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python-control/python-control/issues/970#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-control%2Fpython-control%2Fissues%2F970
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%2Fissues%2F970
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%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python-control%2Fpython-control
Reloadhttps://github.com/python-control/python-control/issues/970
Reloadhttps://github.com/python-control/python-control/issues/970
Reloadhttps://github.com/python-control/python-control/issues/970
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
New issuehttps://github.com/login?return_to=https://github.com/python-control/python-control/issues/970
New issuehttps://github.com/login?return_to=https://github.com/python-control/python-control/issues/970
#980https://github.com/python-control/python-control/pull/980
Strange nondeterministic issues when using phase_plot with X, Y and X0 sethttps://github.com/python-control/python-control/issues/970#top
#980https://github.com/python-control/python-control/pull/980
https://github.com/murrayrm
https://github.com/FeldrinH
https://github.com/FeldrinH
FeldrinHhttps://github.com/FeldrinH
on Feb 13, 2024https://github.com/python-control/python-control/issues/970#issue-2133321369
https://python-control.readthedocs.io/en/latest/phaseplots.htmlhttps://python-control.readthedocs.io/en/latest/phaseplots.html
https://private-user-images.githubusercontent.com/5256211/304582309-cd64a25d-a389-4ee7-b90f-a9ff62d0d78d.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njk2ODQ4OTcsIm5iZiI6MTc2OTY4NDU5NywicGF0aCI6Ii81MjU2MjExLzMwNDU4MjMwOS1jZDY0YTI1ZC1hMzg5LTRlZTctYjkwZi1hOWZmNjJkMGQ3OGQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDEyOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjAxMjlUMTEwMzE3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OTVjYzFhZTM5N2ZlYjdjZjUyOTI5NTViYzk4MjNmOWYwODlhODI5NGMwZmZjZDBmZTZkNGQxMWZmMDQwZjA0ZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.ZeSG_5rki_TzyRtxdy0h2Eqlms-6bzPUbA0NdR-Lp9Y
https://private-user-images.githubusercontent.com/5256211/304582423-753939bd-bc6a-4066-a2d4-3b6763f86d33.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njk2ODQ4OTcsIm5iZiI6MTc2OTY4NDU5NywicGF0aCI6Ii81MjU2MjExLzMwNDU4MjQyMy03NTM5MzliZC1iYzZhLTQwNjYtYTJkNC0zYjY3NjNmODZkMzMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDEyOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjAxMjlUMTEwMzE3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MTY3ZGFjZGIzYzVkOWEwZDMxZmJmZTQwMTkxMTg1NzUzYzBmM2E1ZDZmMjJmYjNiMzNiMTVkNjY4YTJkOGU5YSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.MeM1dC26SUwOLCuZSP-opw3i2DKd8BJlXRhBMZmJBB8
https://private-user-images.githubusercontent.com/5256211/304582557-d6f05d7f-644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Dj8x3h_13dCq9LvAwXyMWs
murrayrmhttps://github.com/murrayrm
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.