René's URL Explorer Experiment


Title: [Bug]: Event handling with input in callback function · Issue #30419 · matplotlib/matplotlib · GitHub

Open Graph Title: [Bug]: Event handling with input in callback function · Issue #30419 · matplotlib/matplotlib

X Title: [Bug]: Event handling with input in callback function · Issue #30419 · matplotlib/matplotlib

Description: Bug summary When using a button click event handler, if the callback function includes the input function, the figure automatically closes when the callback function finishes. Code for reproduction import matplotlib.pyplot as plt import ...

Open Graph Description: Bug summary When using a button click event handler, if the callback function includes the input function, the figure automatically closes when the callback function finishes. Code for reproduction...

X Description: Bug summary When using a button click event handler, if the callback function includes the input function, the figure automatically closes when the callback function finishes. Code for reproduction...

Opengraph URL: https://github.com/matplotlib/matplotlib/issues/30419

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Event handling with input in callback function","articleBody":"### Bug summary\n\nWhen using a [button click event handler](https://matplotlib.org/stable/users/explain/figure/event_handling.html), if the callback function includes the [input](https://docs.python.org/3/library/functions.html#input) function, the figure automatically closes when the callback function finishes.\n\n### Code for reproduction\n\n```python\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nfig, ax = plt.subplots()\nax.plot(np.random.rand(10))\n\ndef onclick(event):\n    print(f'click: x={event.x}, y={event.y}')\n    info = input('Enter some information about this point: ')  # Comment out this line\n    print(info)                                                # Comment out this line\n\ncid = fig.canvas.mpl_connect('button_press_event', onclick)\n\nplt.show()\n```\n\n### Actual outcome\n\nAfter a single event and iteration of the `onclick` callback function, the figure automatically closes without giving the user the opportunity to click on more points.\n\nhttps://github.com/user-attachments/assets/58768094-9bce-4320-95ad-2446bb5ff92c\n\n### Expected outcome\n\nThe figure should remain open and allow the user to click on many points until the user explicitly closes it.  This is the standard behavior when the two lines indicated in the MWE related to the `input` function are commented out.\n\nhttps://github.com/user-attachments/assets/cf99ca2a-5902-4c6d-a51c-854fbe7da6cc\n\n\n\n### Additional information\n\n_No response_\n\n### Operating system\n\nOS/X\n\n### Matplotlib Version\n\n3.10.3\n\n### Matplotlib Backend\n\nmacosx\n\n### Python version\n\nPython 3.13.5\n\n### Jupyter version\n\n4.4.5\n\n### Installation\n\npip","author":{"url":"https://github.com/ljlamarche","@type":"Person","name":"ljlamarche"},"datePublished":"2025-08-13T00:31:09Z","url":"https://github.com/matplotlib/matplotlib/issues/30419"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:5a6e1924-7d38-0b67-7ec6-30721bed8274
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE29E:3B6B85:1931766:213C270:6B067902
html-safe-nonce8894a5793e6f090d5d41ab31cb417b06a4c388290d096889d4cb6649a56030ea
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMjlFOjNCNkI4NToxOTMxNzY2OjIxM0MyNzA6NkIwNjc5MDIiLCJ2aXNpdG9yX2lkIjoiMTcyNTQ1NjI2MzQ2MDMyMTUzOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacc0ce5e4e32a5535253e54ce90f00379193527bcd70022eae214c33280974975c
hovercard-subject-tagissue:3316491145
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/matplotlib/matplotlib/30419/issue_layout
twitter:imagehttps://opengraph.githubassets.com/eedfd99b6ef25d7a000e0d3685d4fced2d6fa0c617cfff5fc434ae72431ab050/matplotlib/matplotlib/issues/30419
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/eedfd99b6ef25d7a000e0d3685d4fced2d6fa0c617cfff5fc434ae72431ab050/matplotlib/matplotlib/issues/30419
og:image:altBug summary When using a button click event handler, if the callback function includes the input function, the figure automatically closes when the callback function finishes. Code for reproduction...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameljlamarche
hostnamegithub.com
expected-hostnamegithub.com
None4462ff7ebfd3d551f202659f2423dae617b6849d23b1df6465dc504ef497d14a
turbo-cache-controlno-preview
go-importgithub.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git
octolytics-dimension-user_id215947
octolytics-dimension-user_loginmatplotlib
octolytics-dimension-repository_id1385122
octolytics-dimension-repository_nwomatplotlib/matplotlib
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1385122
octolytics-dimension-repository_network_root_nwomatplotlib/matplotlib
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
release6d3909414814ff86ce7da4c51a0f4918a13fb41b
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/matplotlib/matplotlib/issues/30419#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F30419
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F30419
Sign uphttps://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=matplotlib%2Fmatplotlib
Reloadhttps://github.com/matplotlib/matplotlib/issues/30419
Reloadhttps://github.com/matplotlib/matplotlib/issues/30419
Reloadhttps://github.com/matplotlib/matplotlib/issues/30419
matplotlibhttps://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Codehttps://github.com/matplotlib/matplotlib
Issues1k (1k)https://github.com/matplotlib/matplotlib/issues
Pull requests430 (430)https://github.com/matplotlib/matplotlib/pulls
Actionshttps://github.com/matplotlib/matplotlib/actions
Projectshttps://github.com/matplotlib/matplotlib/projects
Wikihttps://github.com/matplotlib/matplotlib/wiki
Security and qualityhttps://github.com/matplotlib/matplotlib/security
Insightshttps://github.com/matplotlib/matplotlib/insights
https://github.com/matplotlib/matplotlib
New issuehttps://github.com/login?return_to=https://github.com/matplotlib/matplotlib/issues/30419
New issuehttps://github.com/login?return_to=https://github.com/matplotlib/matplotlib/issues/30419
#32363https://github.com/matplotlib/matplotlib/pull/32363
[Bug]: Event handling with input in callback functionhttps://github.com/matplotlib/matplotlib/issues/30419#top
#32363https://github.com/matplotlib/matplotlib/pull/32363
GUI: MacOSXhttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22GUI%3A%20MacOSX%22
https://github.com/ljlamarche
ljlamarchehttps://github.com/ljlamarche
on Aug 13, 2025https://github.com/matplotlib/matplotlib/issues/30419#issue-3316491145
button click event handlerhttps://matplotlib.org/stable/users/explain/figure/event_handling.html
inputhttps://docs.python.org/3/library/functions.html#input
https://github.com/QuLogic
QuLogichttps://github.com/QuLogic
on Aug 13, 2025https://github.com/matplotlib/matplotlib/issues/30419#issuecomment-3182082280
QuLogichttps://github.com/QuLogic
GUI: MacOSXhttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22GUI%3A%20MacOSX%22
on Aug 13, 2025https://github.com/matplotlib/matplotlib/issues/30419#event-19127654198
https://github.com/QuLogic
QuLogichttps://github.com/QuLogic
on Aug 13, 2025https://github.com/matplotlib/matplotlib/issues/30419#issuecomment-3182082850
@greglucashttps://github.com/greglucas
https://github.com/ljlamarche
ljlamarchehttps://github.com/ljlamarche
on Aug 13, 2025https://github.com/matplotlib/matplotlib/issues/30419#issuecomment-3185491532
https://github.com/greglucas
greglucashttps://github.com/greglucas
on Aug 15, 2025https://github.com/matplotlib/matplotlib/issues/30419#issuecomment-3191404691
matplotlib/src/_macosx.mhttps://github.com/matplotlib/matplotlib/blob/be68dfecf9d26ac1a8e1e30a0de6171ecf174cd5/src/_macosx.m#L105
be68dfehttps://github.com/matplotlib/matplotlib/commit/be68dfecf9d26ac1a8e1e30a0de6171ecf174cd5
https://github.com/dstansby
dstansbyhttps://github.com/dstansby
on Aug 20, 2025https://github.com/matplotlib/matplotlib/issues/30419#issuecomment-3207622270
18909c7https://github.com/matplotlib/matplotlib/commit/18909c7237cb4ce7dd2d9c9b16e1b94c83791eb9
https://github.com/iccir
iccirhttps://github.com/iccir
on Jul 5, 2026https://github.com/matplotlib/matplotlib/issues/30419#issuecomment-4886462940
iccirhttps://github.com/iccir
on Jul 5, 2026https://github.com/matplotlib/matplotlib/issues/30419#event-27577740849
First pass at MPLEventLoop for matplotlib#30419https://github.com/iccir/matplotlib/commit/8653dadfda33bc8b8301e3e9d51541563e5ff331
matplotlib#30419https://github.com/matplotlib/matplotlib/issues/30419
8653dadhttps://github.com/iccir/matplotlib/commit/8653dadfda33bc8b8301e3e9d51541563e5ff331
https://github.com/iccir
iccirhttps://github.com/iccir
on Jul 7, 2026https://github.com/matplotlib/matplotlib/issues/30419#issuecomment-4907586392
#28981https://github.com/matplotlib/matplotlib/pull/28981
#28981https://github.com/matplotlib/matplotlib/pull/28981
#28981https://github.com/matplotlib/matplotlib/pull/28981
#26869https://github.com/matplotlib/matplotlib/issues/26869
#27515https://github.com/matplotlib/matplotlib/issues/27515
Sign up for freehttps://github.com/signup?return_to=https://github.com/matplotlib/matplotlib/issues/30419
Sign in to commenthttps://github.com/login?return_to=https://github.com/matplotlib/matplotlib/issues/30419
GUI: MacOSXhttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22GUI%3A%20MacOSX%22
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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.