René's URL Explorer Experiment


Title: [Bug]: Setting aspect back to auto cannot recover the original 3D plot · Issue #31276 · matplotlib/matplotlib · GitHub

Open Graph Title: [Bug]: Setting aspect back to auto cannot recover the original 3D plot · Issue #31276 · matplotlib/matplotlib

X Title: [Bug]: Setting aspect back to auto cannot recover the original 3D plot · Issue #31276 · matplotlib/matplotlib

Description: Bug summary This bug arises when I plot filled contours with 3d projection and auto aspect, and save the figure as '3d-plot1.png'. Then, I set the aspect to 'equal' and back to 'auto', and save the figure as '3d-plot2.png', which is inco...

Open Graph Description: Bug summary This bug arises when I plot filled contours with 3d projection and auto aspect, and save the figure as '3d-plot1.png'. Then, I set the aspect to 'equal' and back to 'auto', and save the...

X Description: Bug summary This bug arises when I plot filled contours with 3d projection and auto aspect, and save the figure as '3d-plot1.png'. Then, I set the aspect to 'equal' and back to '...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Setting aspect back to auto cannot recover the original 3D plot","articleBody":"### Bug summary\n\nThis bug arises when I plot filled contours with 3d projection and auto aspect,  and save the figure as '3d-plot1.png'. Then, I set the aspect to `'equal'` and back to `'auto'`, and save the figure as '3d-plot2.png', which is inconsistent with '3d-plot1.png'. However, this bug does not occur in 2d filled contours.\n\n### Code for reproduction\n\n```Python\nimport matplotlib.pyplot as plt\nfrom mpl_toolkits.mplot3d import axes3d\n\nfig1 = plt.figure()\nax1 = fig1.add_subplot(projection=None)\nX, Y, Z = axes3d.get_test_data()\nax1.contourf(X, Y, Z, cmap=\"coolwarm\")\nax1.set_aspect('auto')\nfig1.savefig('2d-plot1.png') # Correct\nax1.set_aspect('equal')\nax1.set_aspect('auto')\nfig1.savefig('2d-plot2.png') # Correct (consistent with 2d-plot1.png)\n\nfig2 = plt.figure()\nax2 = fig2.add_subplot(projection='3d')\nX, Y, Z = axes3d.get_test_data()\nax2.contourf(X, Y, Z, cmap=\"coolwarm\")\nax2.set_aspect('auto')\nfig2.savefig('3d-plot1.png') # Correct\nax2.set_aspect('equal')\nax2.set_aspect('auto')\nfig2.savefig('3d-plot2.png') # Wrong (inconsistent with 3d-plot1.png)\n```\n\n### Actual outcome\n\n#### 2d-plot1.png\n\n\u003cimg width=\"640\" height=\"480\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/b1a4eec5-cf8e-403a-a1cd-b9b07719d68e\" /\u003e\n\n#### 2d-plot2.png\n\n\u003cimg width=\"640\" height=\"480\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/d2a68576-5ae2-4ab4-80ee-d329009bbd31\" /\u003e\n\n#### 3d-plot1.png\n\n\u003cimg width=\"640\" height=\"480\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/0169e96b-97ca-4312-b38c-d049f5538cb3\" /\u003e\n\n#### 3d-plot2.png\n\n\u003cimg width=\"640\" height=\"480\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/e7d40002-9637-4f5f-a851-43daea06fdd0\" /\u003e\n\n### Expected outcome\n\n3d-plot2.png should be the same as 3d-plot1.png.\n\n### Additional information\n\n_No response_\n\n### Operating system\n\n_No response_\n\n### Matplotlib Version\n\n3.10.8\n\n### Matplotlib Backend\n\n_No response_\n\n### Python version\n\n_No response_\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\nNone","author":{"url":"https://github.com/smith2936","@type":"Person","name":"smith2936"},"datePublished":"2026-03-11T07:32:56.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/31276/matplotlib/issues/31276"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:89ed2f48-4275-4075-3f36-d75ee2ad36f6
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEBBA:1A1F1B:49983FD:67035F8:6A4F8530
html-safe-nonced323548baf80ae57fa676f26c517933f2c3ff74de9ee991b5488b7b01abbec61
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQkJBOjFBMUYxQjo0OTk4M0ZEOjY3MDM1Rjg6NkE0Rjg1MzAiLCJ2aXNpdG9yX2lkIjoiMzUwODg3NTUxODI0OTIzOTg1NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf7195e870624efa6b6560f633290438444652f9c41748fbb26331cf25a30f925
hovercard-subject-tagissue:4056452198
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/31276/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f0bd05888cf0bd227c374d94a973fe94b644d028a5af4d1a191b0d897511a2be/matplotlib/matplotlib/issues/31276
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f0bd05888cf0bd227c374d94a973fe94b644d028a5af4d1a191b0d897511a2be/matplotlib/matplotlib/issues/31276
og:image:altBug summary This bug arises when I plot filled contours with 3d projection and auto aspect, and save the figure as '3d-plot1.png'. Then, I set the aspect to 'equal' and back to 'auto', and save the...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesmith2936
hostnamegithub.com
expected-hostnamegithub.com
Noneb92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9
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
release4b249b445842943ed31549e027f57a8ade9881ed
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/matplotlib/matplotlib/issues/31276#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F31276
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
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
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
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/enterprise/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%2Fmatplotlib%2Fmatplotlib%2Fissues%2F31276
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=matplotlib%2Fmatplotlib
Reloadhttps://github.com/matplotlib/matplotlib/issues/31276
Reloadhttps://github.com/matplotlib/matplotlib/issues/31276
Reloadhttps://github.com/matplotlib/matplotlib/issues/31276
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/31276
matplotlib https://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/31276
Notifications https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Fork 8.4k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Star 23k https://github.com/login?return_to=%2Fmatplotlib%2Fmatplotlib
Code https://github.com/matplotlib/matplotlib
Issues 1.1k https://github.com/matplotlib/matplotlib/issues
Pull requests 410 https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality 0 https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
Code https://github.com/matplotlib/matplotlib
Issues https://github.com/matplotlib/matplotlib/issues
Pull requests https://github.com/matplotlib/matplotlib/pulls
Actions https://github.com/matplotlib/matplotlib/actions
Projects https://github.com/matplotlib/matplotlib/projects
Wiki https://github.com/matplotlib/matplotlib/wiki
Security and quality https://github.com/matplotlib/matplotlib/security
Insights https://github.com/matplotlib/matplotlib/pulse
#31304https://github.com/matplotlib/matplotlib/pull/31304
[Bug]: Setting aspect back to auto cannot recover the original 3D plothttps://github.com/matplotlib/matplotlib/issues/31276#top
#31304https://github.com/matplotlib/matplotlib/pull/31304
status: confirmed bughttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22status%3A%20confirmed%20bug%22
topic: mplot3dhttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22topic%3A%20mplot3d%22
https://github.com/smith2936
smith2936https://github.com/smith2936
on Mar 11, 2026https://github.com/matplotlib/matplotlib/issues/31276#issue-4056452198
https://private-user-images.githubusercontent.com/181318496/561419147-b1a4eec5-cf8e-403a-a1cd-b9b07719d68e.png?jw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GI4MDVhNmQ1NDExNzVjODVjZTM2NjAzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.kcAdTiLMqMWQzN2a4yqOWufTZ5fnUZfigcw92PdXS74
https://private-user-images.githubusercontent.com/181318496/561419485-e7d40002-9637-4f5f-a851-43daea06fdd0.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODM1OTY2MzYsIm5iZiI6MTc4MzU5NjMzNiwicGF0aCI6Ii8xODEzMTg0OTYvNTYxNDE5NDg1LWU3ZDQwMDAyLTk2MzctNGY1Zi1hODUxLTQzZGFlYTA2ZmRkMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNzA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDcwOVQxMTI1MzZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lNDI3MjJlNDgxMTE2MzQ2NjgwNTk2MTMxYzQwMjU0NTQ3NTllN2VmZWI3Yzc3NGJmZGJjNWNiYWI5MDcyNjM1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.bPj2qBqdM3A0cd-gFZSJlhjwS09YWscbFiTFAGYenwA
status: confirmed bughttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22status%3A%20confirmed%20bug%22
topic: mplot3dhttps://github.com/matplotlib/matplotlib/issues?q=state%3Aopen%20label%3A%22topic%3A%20mplot3d%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

Viewport: width=device-width


URLs of crawlers that visited me.