Title: Bug Report: saved Figure ignores figure.facecolor · Issue #17467 · matplotlib/matplotlib · GitHub
Open Graph Title: Bug Report: saved Figure ignores figure.facecolor · Issue #17467 · matplotlib/matplotlib
X Title: Bug Report: saved Figure ignores figure.facecolor · Issue #17467 · matplotlib/matplotlib
Description: Bug report When saving a figure, either via plt.savefig() or by clicking the disk icon on the figure display UI, the saved figure has no facecolor. Code for reproduction dino@DINO:~/code/mplfinance$ ipython Python 3.7.4 (default, Aug 13 ...
Open Graph Description: Bug report When saving a figure, either via plt.savefig() or by clicking the disk icon on the figure display UI, the saved figure has no facecolor. Code for reproduction dino@DINO:~/code/mplfinance...
X Description: Bug report When saving a figure, either via plt.savefig() or by clicking the disk icon on the figure display UI, the saved figure has no facecolor. Code for reproduction dino@DINO:~/code/mplfinance...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/17467
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bug Report: saved Figure ignores figure.facecolor","articleBody":"### Bug report\r\n\r\nWhen saving a figure, either via `plt.savefig()` or by clicking the disk icon on the figure display UI, the saved figure has no facecolor. \r\n\r\n**Code for reproduction**\r\n```python\r\ndino@DINO:~/code/mplfinance$ ipython\r\nPython 3.7.4 (default, Aug 13 2019, 20:35:49)\r\nType 'copyright', 'credits' or 'license' for more information\r\nIPython 7.8.0 -- An enhanced Interactive Python. Type '?' for help.\r\n\r\nIn [1]: import matplotlib as mpl\r\n\r\nIn [2]: mpl.__version__\r\nOut[2]: '3.1.3'\r\n\r\nIn [3]: import matplotlib.pyplot as plt\r\n\r\nIn [4]: y = [2,4,3,7,1]\r\nIn [5]: x = [0,1,2,3,4]\r\n\r\nIn [6]: plt.rcParams['figure.facecolor'] = 'c'\r\n\r\nIn [7]: plt.plot(x,y)\r\nOut[7]: [\u003cmatplotlib.lines.Line2D at 0x7ff9eeb49090\u003e]\r\n\r\nIn [8]: plt.show()\r\n\r\nIn [9]: plt.rcParams['figure.facecolor'] = 'c'\r\nIn [10]: plt.plot(x,y)\r\nOut[10]: [\u003cmatplotlib.lines.Line2D at 0x7ff9d7890d10\u003e]\r\n\r\nIn [11]: plt.savefig('testsave.png')\r\n```\r\n---\r\n### Here is what the plot looks like upon `plt.show()`\r\n\r\n\r\n\r\n---\r\n### Here is what the plot looks like when I click the disk icon on the above UI to save the plot:\r\n\r\n\r\n\r\n---\r\n### Here is what the plot looks like when I call `plt.savefig('testsave.png')`\r\n\r\n\r\n","author":{"url":"https://github.com/DanielGoldfarb","@type":"Person","name":"DanielGoldfarb"},"datePublished":"2020-05-20T19:27:34.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/17467/matplotlib/issues/17467"}
| 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:bb84167b-e634-0d11-f782-e30d8a2d3522 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EBA0:273DA9:19C226A:22378E3:6A51D54B |
| html-safe-nonce | 50b3b931369f2dc5d2be2d3dc64d0413ac39d5144cbf4c738b4684d1fe1829cf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQkEwOjI3M0RBOToxOUMyMjZBOjIyMzc4RTM6NkE1MUQ1NEIiLCJ2aXNpdG9yX2lkIjoiNjAwMTUwOTIxODEzNTQ2MzE1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 405b29e2a5bfb2b66ebf29fe2e78c3e3d9c3f3dd506146068f053932cb710ad5 |
| hovercard-subject-tag | issue:622029596 |
| 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/17467/issue_layout |
| twitter:image | https://opengraph.githubassets.com/efa55fe31d190811529cba87d3c3992daeb3d9f4b165c962d6ee16863ff06178/matplotlib/matplotlib/issues/17467 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/efa55fe31d190811529cba87d3c3992daeb3d9f4b165c962d6ee16863ff06178/matplotlib/matplotlib/issues/17467 |
| og:image:alt | Bug report When saving a figure, either via plt.savefig() or by clicking the disk icon on the figure display UI, the saved figure has no facecolor. Code for reproduction dino@DINO:~/code/mplfinance... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DanielGoldfarb |
| 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