René's URL Explorer Experiment


Title: Savefig's frameon is ignored · Issue #10939 · matplotlib/matplotlib · GitHub

Open Graph Title: Savefig's frameon is ignored · Issue #10939 · matplotlib/matplotlib

X Title: Savefig's frameon is ignored · Issue #10939 · matplotlib/matplotlib

Description: The savefig documentation says about the frameon argument frameon : bool If True, the figure patch will be colored, if False, the figure background will be transparent. If not provided, the rcParam ‘savefig.frameon’ will be used. This do...

Open Graph Description: The savefig documentation says about the frameon argument frameon : bool If True, the figure patch will be colored, if False, the figure background will be transparent. If not provided, the rcParam...

X Description: The savefig documentation says about the frameon argument frameon : bool If True, the figure patch will be colored, if False, the figure background will be transparent. If not provided, the rcParam...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Savefig's frameon is ignored","articleBody":"The `savefig` documentation says about the `frameon` argument \r\n\u003eframeon : bool  \r\n\u003eIf True, the figure patch will be colored, if False, the figure background will be transparent. If not provided, the rcParam ‘savefig.frameon’ will be used.\r\n\r\nThis does not seem to be the case\r\n\r\n\r\n    fig, ax = plt.subplots(figsize = (3,3), dpi=72)\r\n    ax.set_facecolor(\"navajowhite\")\r\n    fig.savefig(\"fname\", framon=True) # or False\r\n\r\ngives (grey is the background to see the effect):\r\n\r\n![image](https://user-images.githubusercontent.com/23121882/38175820-e74f2ae2-35e2-11e8-823a-867cf1258dab.png)\r\n\r\nWe would expect to see a difference if `frameon=False`, namely to not have the white frame present in the plot. \r\n\r\nThe only option to get the frame off is apparently to use a transparent color for the `facecolor` argument\r\n```\r\nfig.savefig(\"fname\", facecolor=(1,1,1,0))\r\n```\r\n\r\n![image](https://user-images.githubusercontent.com/23121882/38175847-9f60b010-35e3-11e8-8fc8-8cab4ecf0cb7.png)\r\n\r\nThis however still keeps the background patch. It is hence what we would expect the `transparent` argument in `savefig` to do.\r\n\r\n\u003etransparent : bool  \r\n\u003eIf True, the axes patches will all be transparent; the figure patch will also be transparent unless facecolor and/or edgecolor are specified via kwargs. This is useful, for example, for displaying a plot on top of a colored background on a web page.\r\n\r\nSo this has essentially the effect one would expect from `frameon`, except that it applies to the figure patch **and** the axes patches. \r\n\r\n![image](https://user-images.githubusercontent.com/23121882/38176116-5cea6f54-35e9-11e8-967c-ba5c6948279a.png)\r\n\r\nIt also is overwritten in case a `facecolor` is specified.\r\n\r\n![image](https://user-images.githubusercontent.com/23121882/38176128-b49c017c-35e9-11e8-8602-74d00cf3fd57.png)\r\n\r\nWhile this is according to the documentation, it's highly confusing. \r\n\r\nHere is a jupyter notebook in case people want to reproduce all the figures: [TransparencyIssue.zip](https://github.com/matplotlib/matplotlib/files/1866618/TransparencyIssue.zip)\r\n\r\n\r\n\r\n\r\nTo summarize:\r\n* `frameon` is ignored. \r\n* There is hence no way to completely get rid of the background frame (only to make it transparent).\r\n* The `transparent` is conditional on the `facecolor` being set. (This leads to very counterintuitive behaviour, e.g. `savefig(..., transparent=True, facecolor=None)` results in a **non-transparent** background with a transparent axes.\r\n\r\nProposal for a fix:\r\n\r\n* `frameon` keeps or removes the background patch.\r\n* `transparent` turns the background patch and all axes transparent, independently of the facecolor.\r\n* `facecolor` with a transparent color like `(1,1,1,0)` can be used in the rather uncommon case where a transparent background patch is needed (and hence `frameon=False` would not help) but the axes should not be made transparent.\r\n* (optional) Check if it makes sense to let `transparent=True` remove a colorbar patch's facecolor [[*](https://stackoverflow.com/questions/53190203/matplotlib-pyplot-pcolor-savefig-colorbar-transparency)]\r\n\r\n\r\n","author":{"url":"https://github.com/ImportanceOfBeingErnest","@type":"Person","name":"ImportanceOfBeingErnest"},"datePublished":"2018-04-01T19:13:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/10939/matplotlib/issues/10939"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:6dd27a77-4b80-39d7-895f-7a78bbaefb1b
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEC0A:134698:A18EF4:DBCC87:6A5203B8
html-safe-nonce1954a8a75173d61b1e6a7495d113b1a66fd0eb2289a578481319850c26cd5e0f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQzBBOjEzNDY5ODpBMThFRjQ6REJDQzg3OjZBNTIwM0I4IiwidmlzaXRvcl9pZCI6IjE4Mjk1ODE1NjA3ODcxMDg3OTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac4d72526a3828f18c192503d5645e0f6948c1bff706e8ec5d94ff74604f2df49c
hovercard-subject-tagissue:310346473
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/10939/issue_layout
twitter:imagehttps://opengraph.githubassets.com/0c2ddc11d276c13c42d3040fa38ad865b36189dee1e7f1628410870c9af210a0/matplotlib/matplotlib/issues/10939
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0c2ddc11d276c13c42d3040fa38ad865b36189dee1e7f1628410870c9af210a0/matplotlib/matplotlib/issues/10939
og:image:altThe savefig documentation says about the frameon argument frameon : bool If True, the figure patch will be colored, if False, the figure background will be transparent. If not provided, the rcParam...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameImportanceOfBeingErnest
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
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
release7aed05249554b889eb33d002851a973eebcc7e91
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/matplotlib/matplotlib/issues/10939#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmatplotlib%2Fmatplotlib%2Fissues%2F10939
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%2F10939
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/10939
Reloadhttps://github.com/matplotlib/matplotlib/issues/10939
Reloadhttps://github.com/matplotlib/matplotlib/issues/10939
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/10939
matplotlib https://github.com/matplotlib
matplotlibhttps://github.com/matplotlib/matplotlib
Please reload this pagehttps://github.com/matplotlib/matplotlib/issues/10939
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 409 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
Savefig's frameon is ignoredhttps://github.com/matplotlib/matplotlib/issues/10939#top
https://github.com/ImportanceOfBeingErnest
ImportanceOfBeingErnesthttps://github.com/ImportanceOfBeingErnest
on Apr 1, 2018https://github.com/matplotlib/matplotlib/issues/10939#issue-310346473
https://user-images.githubusercontent.com/23121882/38175820-e74f2ae2-35e2-11e8-823a-867cf1258dab.png
https://user-images.githubusercontent.com/23121882/38175847-9f60b010-35e3-11e8-8fc8-8cab4ecf0cb7.png
https://user-images.githubusercontent.com/23121882/38176116-5cea6f54-35e9-11e8-967c-ba5c6948279a.png
https://user-images.githubusercontent.com/23121882/38176128-b49c017c-35e9-11e8-8602-74d00cf3fd57.png
TransparencyIssue.ziphttps://github.com/matplotlib/matplotlib/files/1866618/TransparencyIssue.zip
*https://stackoverflow.com/questions/53190203/matplotlib-pyplot-pcolor-savefig-colorbar-transparency
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.