René's URL Explorer Experiment


Title: [Bug]: Annotation clip path / box regression in 3.9 · Issue #28717 · matplotlib/matplotlib · GitHub

Open Graph Title: [Bug]: Annotation clip path / box regression in 3.9 · Issue #28717 · matplotlib/matplotlib

X Title: [Bug]: Annotation clip path / box regression in 3.9 · Issue #28717 · matplotlib/matplotlib

Description: Bug summary In matplotlib 3.9.1, the clip_path and clip_bbox arguments of annotate do not properly clip the annotation. The code example below worked as expected in 3.8. Code for reproduction import matplotlib import matplotlib.pyplot as...

Open Graph Description: Bug summary In matplotlib 3.9.1, the clip_path and clip_bbox arguments of annotate do not properly clip the annotation. The code example below worked as expected in 3.8. Code for reproduction impor...

X Description: Bug summary In matplotlib 3.9.1, the clip_path and clip_bbox arguments of annotate do not properly clip the annotation. The code example below worked as expected in 3.8. Code for reproduction impor...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Annotation clip path / box regression in 3.9","articleBody":"### Bug summary\n\nIn matplotlib 3.9.1, the `clip_path` and `clip_bbox` arguments of `annotate` do not properly clip the annotation.\r\n\r\nThe code example below worked as expected in 3.8.\n\n### Code for reproduction\n\n```Python\nimport matplotlib\r\nimport matplotlib.pyplot as plt\r\nfrom matplotlib.transforms import Bbox, TransformedBbox\r\n\r\nfig, ax = plt.subplots()\r\n\r\nrect = ax.axvspan(0.5, 0.55, 0, 1)\r\n\r\ntransform = ax.get_xaxis_transform()\r\n\r\nbbox = Bbox.from_extents(0.5, 0, 0.55, 1)\r\ntbbox = TransformedBbox(bbox, transform)\r\n\r\ntext_kw= dict()\r\ntext_kw.setdefault(\"va\", \"top\")\r\ntext_kw.setdefault(\"clip_on\", True)\r\ntext_kw.setdefault(\"bbox\", dict(boxstyle=\"round\", facecolor=\"white\"))\r\n\r\n\r\nann = ax.annotate(\r\n    \"Annotation\",\r\n    xy=(0.5, 1),\r\n    xytext=(8, -10),\r\n    textcoords=\"offset points\",\r\n    clip_path=rect,\r\n    clip_box=tbbox,\r\n    **text_kw,\r\n)\r\n\r\nax.set(xlim=[0, 1])\n```\n\n\n### Actual outcome\n\n![image](https://github.com/user-attachments/assets/27d31cb8-cbcc-4c4d-a58f-c6e59903c873)\r\n\r\nIn matplotlib 3.9.1.  Note that the annotation is not clipped.\n\n### Expected outcome\n\n![image](https://github.com/user-attachments/assets/2515d5fe-3ae8-4e93-ad60-09c27bb10cc6)\r\n\r\nGenerated with matplotlib 3.8.1; the annotation is properly clipped.\n\n### Additional information\n\n_No response_\n\n### Operating system\n\nn/a\n\n### Matplotlib Version\n\n3.9.1\n\n### Matplotlib Backend\n\n'module://matplotlib_inline.backend_inline'\n\n### Python version\n\nmany (3.8 to 3.12)\n\n### Jupyter version\n\nn/a\n\n### Installation\n\nconda","author":{"url":"https://github.com/bmcfee","@type":"Person","name":"bmcfee"},"datePublished":"2024-08-13T14:51:45Z","url":"https://github.com/matplotlib/matplotlib/issues/28717"}

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:f47046c8-e395-d8c5-a559-34d54b9c12e1
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA438:11BA80:13FE63:1B6117:6B0675D2
html-safe-nonce75f282bb88e1e0045595661b6bf8c383ddbb994a6b74fb41b761b9f76996df97
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNDM4OjExQkE4MDoxM0ZFNjM6MUI2MTE3OjZCMDY3NUQyIiwidmlzaXRvcl9pZCI6IjE1OTc1NDM5MjU0MDc5NzA3NzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac8122cef53eeba3decb5dc5b48c8b3850eb2d4d3f41b10c7ad67e3928a856899e
hovercard-subject-tagissue:2463554842
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/28717/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a76e2a86bd8b41f38b0fc1a11bb980b3fd8360df5a0426353b184b3d1f347ea6/matplotlib/matplotlib/issues/28717
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a76e2a86bd8b41f38b0fc1a11bb980b3fd8360df5a0426353b184b3d1f347ea6/matplotlib/matplotlib/issues/28717
og:image:altBug summary In matplotlib 3.9.1, the clip_path and clip_bbox arguments of annotate do not properly clip the annotation. The code example below worked as expected in 3.8. Code for reproduction impor...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebmcfee
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/28717#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F28717
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%2F28717
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/28717
Reloadhttps://github.com/matplotlib/matplotlib/issues/28717
Reloadhttps://github.com/matplotlib/matplotlib/issues/28717
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/28717
New issuehttps://github.com/login?return_to=https://github.com/matplotlib/matplotlib/issues/28717
[Bug]: Annotation clip path / box regression in 3.9https://github.com/matplotlib/matplotlib/issues/28717#top
topic: annotationhttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22topic%3A%20annotation%22
https://github.com/bmcfee
bmcfeehttps://github.com/bmcfee
on Aug 13, 2024https://github.com/matplotlib/matplotlib/issues/28717#issue-2463554842
https://private-user-images.githubusercontent.com/1190540/357458245-27d31cb8-cbcc-4c4d-a58f-c6e59903c873.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTU1ODU3OTAsIm5iZiI6MTc5NTU4NTQ5MCwicGF0aCI6Ii8xMTkwNTQwLzM1NzQ1ODI0NS0yN2QzMWNiOC1jYmNjLTRjNGQtYTU4Zi1jNmU1OTkwM2M4NzMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MTEyNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjExMjVUMDU0NDUwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZmQyZjBmMGQ0M2IyYTZlZjhhZTE0ZDk0MTE3MTAwZjczZWUxMDI4MGYxNmFlOTM2ZTY4NjFlNjdiZGI3MTljNCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.B8rOEQoGNhRa_qLYNzKJmjShb-8y-Liu3cS9u8NKQ6A
https://private-user-images.githubusercontent.com/1190540/357457872-2515d5fe-3ae8-4e93-ad60-09c27bb10cc6.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTU1ODU3OTAsIm5iZiI6MTc5NTU4NTQ5MCwicGF0aCI6Ii8xMTkwNTQwLzM1NzQ1Nzg3Mi0yNTE1ZDVmZS0zYWU4LTRlOTMtYWQ2MC0wOWMyN2JiMTBjYzYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MTEyNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjExMjVUMDU0NDUwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OWE5YzQ5Yjg5MDZlMzlhZmQyZjVhNzIxNTg4ZTUyN2RmNTIzZTFjYmZhMGQ3NDgyMTdiYWU2NmRhZjg1ZDI2MSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.zj4xfH2J5kMbIJ6OC6M0R8_yfRzKTbj0D76ufDvbsVs
https://github.com/QuLogic
QuLogichttps://github.com/QuLogic
on Aug 13, 2024https://github.com/matplotlib/matplotlib/issues/28717#issuecomment-2287178157
b6694f4https://github.com/matplotlib/matplotlib/commit/b6694f43e5be64b923a4ecb1eb060856af861bf4
https://github.com/QuLogic
QuLogichttps://github.com/QuLogic
on Aug 14, 2024https://github.com/matplotlib/matplotlib/issues/28717#issuecomment-2287828172
matplotlib/lib/matplotlib/artist.pyhttps://github.com/matplotlib/matplotlib/blob/702aeda72486ad25f8d9bc8fd20350e863e47a3b/lib/matplotlib/artist.py#L814-L818
702aedahttps://github.com/matplotlib/matplotlib/commit/702aeda72486ad25f8d9bc8fd20350e863e47a3b
matplotlib/lib/matplotlib/axes/_axes.pyhttps://github.com/matplotlib/matplotlib/blob/702aeda72486ad25f8d9bc8fd20350e863e47a3b/lib/matplotlib/axes/_axes.py#L760-L761
702aedahttps://github.com/matplotlib/matplotlib/commit/702aeda72486ad25f8d9bc8fd20350e863e47a3b
https://github.com/bmcfee
bmcfeehttps://github.com/bmcfee
on Aug 14, 2024https://github.com/matplotlib/matplotlib/issues/28717#issuecomment-2288701620
melissawmhttps://github.com/melissawm
topic: annotationhttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22topic%3A%20annotation%22
on Mar 2, 2026https://github.com/matplotlib/matplotlib/issues/28717#event-23207709636
Sign up for freehttps://github.com/signup?return_to=https://github.com/matplotlib/matplotlib/issues/28717
Sign in to commenthttps://github.com/login?return_to=https://github.com/matplotlib/matplotlib/issues/28717
topic: annotationhttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22topic%3A%20annotation%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.