Title: Transparency always on for PNG in version 3.1.0 · Issue #14339 · matplotlib/matplotlib · GitHub
Open Graph Title: Transparency always on for PNG in version 3.1.0 · Issue #14339 · matplotlib/matplotlib
X Title: Transparency always on for PNG in version 3.1.0 · Issue #14339 · matplotlib/matplotlib
Description: Bug report Bug summary While saving a figure using savefig, the flag for transparency is ignored, and the resulting PNG has a transparent background, even though transparency is set to False. Note: This affect matplotlib 3.1.0. The error...
Open Graph Description: Bug report Bug summary While saving a figure using savefig, the flag for transparency is ignored, and the resulting PNG has a transparent background, even though transparency is set to False. Note:...
X Description: Bug report Bug summary While saving a figure using savefig, the flag for transparency is ignored, and the resulting PNG has a transparent background, even though transparency is set to False. Note:...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/14339
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Transparency always on for PNG in version 3.1.0","articleBody":"\u003c!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--\u003e\r\n\u003c!--You can feel free to delete the sections that do not apply.--\u003e\r\n\r\n### Bug report\r\n\r\n**Bug summary**\r\n\r\nWhile saving a figure using `savefig`, the flag for transparency is ignored, and the resulting PNG has a transparent background, even though transparency is set to `False`.\r\n\u003c!--A short 1-2 sentences that succinctly describes the bug--\u003e\r\n\r\nNote: This affect matplotlib 3.1.0. The error did not occur in 3.0.3 on the same machine as described bellow.\r\n\r\n**Code for reproduction**\r\n\r\n\u003c!--A minimum code snippet required to reproduce the bug.\r\nPlease make sure to minimize the number of dependencies required, and provide\r\nany necessary plotted data.\r\nAvoid using threads, as Matplotlib is (explicitly) not thread-safe.--\u003e\r\n\r\n```python\r\n# Paste your code here\r\nfrom matplotlib import peplos as plt\r\nfig = plt.figure(figsize=[20, 10], frameon=False)\r\nfig.savefig('./test.png', transparent=False)\r\nplt.close()\r\n```\r\n\r\n**Actual outcome**\r\n\r\n\u003c!--The output produced by the above code, which may be a screenshot, console output, etc.--\u003e\r\n\r\nAn empty PNG file, that is transparent.\r\n\r\n**Expected outcome**\r\n\r\nAn empty PNG file with only a white background.\r\n\u003c!--A description of the expected outcome from the code snippet--\u003e\r\n\u003c!--If this used to work in an earlier version of Matplotlib, please note the version it used to work on--\u003e\r\n\r\n**Matplotlib version**\r\n\u003c!--Please specify your platform and versions of the relevant libraries you are using:--\u003e\r\n * Operating system: macOS 10.14.5 / CentOS 6.\r\n * Matplotlib version: 3.1.0\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): module://backend_interagg\r\n * Python version: 3.6.1\r\n * Jupyter version (if applicable):\r\n * Other libraries: \r\n\r\n\u003c!--Please tell us how you installed matplotlib and python e.g., from source, pip, conda--\u003e\r\nPython was installed via pyenv (compiled from source), and matplotlib was installed through pipenv.\r\n\r\n\u003c!--If you installed from conda, please specify which channel you used if not the default--\u003e\r\n","author":{"url":"https://github.com/cLupus","@type":"Person","name":"cLupus"},"datePublished":"2019-05-27T06:37:55.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/14339/matplotlib/issues/14339"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c70156da-59fd-a792-1d66-e33a4b074098 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 828E:13266C:42DB2A:5B13C3:6A524B52 |
| html-safe-nonce | 16d7e27753ba52aa906e8d3b68b07243dffef33a25a79391705b3a18db989366 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MjhFOjEzMjY2Qzo0MkRCMkE6NUIxM0MzOjZBNTI0QjUyIiwidmlzaXRvcl9pZCI6IjM1NTkyMjIyNDE1ODQ2MzA2MTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b00db394de4cf9a8956f6e3ec7960b8de6dac553d6473cd2c77a3f65593cf3b3 |
| hovercard-subject-tag | issue:448689835 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/14339/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2e36d7450539a9d800c2de6a98a62b36210eb0bc85e72adf04aade5aaf503e49/matplotlib/matplotlib/issues/14339 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2e36d7450539a9d800c2de6a98a62b36210eb0bc85e72adf04aade5aaf503e49/matplotlib/matplotlib/issues/14339 |
| og:image:alt | Bug report Bug summary While saving a figure using savefig, the flag for transparency is ignored, and the resulting PNG has a transparent background, even though transparency is set to False. Note:... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cLupus |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width