Title: Figure background is transparent when saving png from notebook backend. · Issue #8654 · matplotlib/matplotlib · GitHub
Open Graph Title: Figure background is transparent when saving png from notebook backend. · Issue #8654 · matplotlib/matplotlib
X Title: Figure background is transparent when saving png from notebook backend. · Issue #8654 · matplotlib/matplotlib
Description: Bug report In Jupyter notebook with %matplotlib notebook: Code for reproduction import matplotlib.pyplot as plt fig, ax = plt.subplots() ax.plot([1,2]) fig.savefig('test.png') I used a screenshot below instead of the file 'test.png' beca...
Open Graph Description: Bug report In Jupyter notebook with %matplotlib notebook: Code for reproduction import matplotlib.pyplot as plt fig, ax = plt.subplots() ax.plot([1,2]) fig.savefig('test.png') I used a screenshot b...
X Description: Bug report In Jupyter notebook with %matplotlib notebook: Code for reproduction import matplotlib.pyplot as plt fig, ax = plt.subplots() ax.plot([1,2]) fig.savefig('test.png') I used a scre...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/8654
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Figure background is transparent when saving png from notebook backend.","articleBody":"\r\n### Bug report\r\nIn Jupyter notebook with `%matplotlib notebook`:\r\n**Code for reproduction**\r\n\r\n\u003c!--A minimum code snippet required to reproduce the bug, also minimizing the number of dependencies required--\u003e\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nfig, ax = plt.subplots()\r\nax.plot([1,2])\r\nfig.savefig('test.png')\r\n```\r\nI used a screenshot below instead of the file 'test.png' because the odd background only shows up in preview, which evidently uses a light gray background instead of the usual white.\r\n**Actual outcome**\r\n\r\n\r\n**Expected outcome**\r\nI expect the white figure background that results in the above example when saving a pdf, or when using a different backend.\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: OS X 10.12.4\r\n * Matplotlib Version: 2.0.2+7.ge6295a4a7\r\n * Python Version: 3.5.2\r\n * Jupyter Version (if applicable): 4.2.1\r\n ","author":{"url":"https://github.com/efiring","@type":"Person","name":"efiring"},"datePublished":"2017-05-23T01:34:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/8654/matplotlib/issues/8654"}
| 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:756e3ad7-f596-e0b0-cf3c-cb1905262a1a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D84C:9B27A:19C2F89:21F6760:6A51D549 |
| html-safe-nonce | fa077cb5e5b5b1dcdc44a44e5664b14c97acc4bb113eaf7720a53e247f680aa3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEODRDOjlCMjdBOjE5QzJGODk6MjFGNjc2MDo2QTUxRDU0OSIsInZpc2l0b3JfaWQiOiI2NTg4OTA3NjEyNTkwNDI5NTEzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 5fe16fa526587b1040f04c425f238352dafd53189e672c696098afed140376fb |
| hovercard-subject-tag | issue:230563168 |
| 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/8654/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2f02f835c64506d308c7ee7dc19c5035be1f71d51ca3a1db6a9f850589994e88/matplotlib/matplotlib/issues/8654 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2f02f835c64506d308c7ee7dc19c5035be1f71d51ca3a1db6a9f850589994e88/matplotlib/matplotlib/issues/8654 |
| og:image:alt | Bug report In Jupyter notebook with %matplotlib notebook: Code for reproduction import matplotlib.pyplot as plt fig, ax = plt.subplots() ax.plot([1,2]) fig.savefig('test.png') I used a screenshot b... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | efiring |
| 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