Title: Figure background colors · Issue #7619 · matplotlib/matplotlib · GitHub
Open Graph Title: Figure background colors · Issue #7619 · matplotlib/matplotlib
X Title: Figure background colors · Issue #7619 · matplotlib/matplotlib
Description: I find the current handling of background colors very non-intuitive: figure facecolor is not applied for savefig() by default figure facecolor is not applied setting frameon=False axis_bgcolor is not applied when hiding axis lines/ticks ...
Open Graph Description: I find the current handling of background colors very non-intuitive: figure facecolor is not applied for savefig() by default figure facecolor is not applied setting frameon=False axis_bgcolor is n...
X Description: I find the current handling of background colors very non-intuitive: figure facecolor is not applied for savefig() by default figure facecolor is not applied setting frameon=False axis_bgcolor is n...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/7619
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Figure background colors","articleBody":"I find the current handling of background colors very non-intuitive:\r\n1. figure `facecolor` is not applied for `savefig()` by default\r\n2. figure `facecolor` is not applied setting `frameon=False`\r\n3. `axis_bgcolor` is not applied when hiding axis lines/ticks via `axis('off')`\r\n\r\nSo using a white plain surface to draw objects needs the following code:\r\n\r\n fig = figure(..., facecolor='w', edgecolor='None')\r\n ax.axis('equal') # equal scale\r\n ax.axis('off') # do not show axis\r\n ax.axis([-1, 1, -1, 1]) # scale to unit lengths\r\n show()\r\n fig.savefig(..., facecolor=fig.get_facecolor(), edgecolor='None', transparent=True)\r\n\r\nMy suggestion\r\n- apply same colors to `savefig()` by default\r\n- mention in the docs of `axis_bgcolor` and `axis('off')` that this setting is ignored\r\n- mention in the docs of `facecolor` and `frameon` that this setting is ignored","author":{"url":"https://github.com/darkdragon-001","@type":"Person","name":"darkdragon-001"},"datePublished":"2016-12-12T12:59:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/7619/matplotlib/issues/7619"}
| 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:3aca3cb2-15d5-036a-1a5d-2c99b71c543e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B250:1AF501:16FB19D:1E5AA91:6A51C3A2 |
| html-safe-nonce | 2598836bff3e06c1059d1fd44ba4536298ae70cd5f49dc79a07f5ef007081bec |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjUwOjFBRjUwMToxNkZCMTlEOjFFNUFBOTE6NkE1MUMzQTIiLCJ2aXNpdG9yX2lkIjoiOTU1NzYzMzY5MTI5OTE5Mzk0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 0e04de678234fba617de70179a41ae5c8d8d35e01e718b30ceecfd1fe7c7f968 |
| hovercard-subject-tag | issue:194968335 |
| 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/7619/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ff1e9b9721e0ad1245a0a49e3dd14e218d246a8b246b11e12f1b836508acc486/matplotlib/matplotlib/issues/7619 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ff1e9b9721e0ad1245a0a49e3dd14e218d246a8b246b11e12f1b836508acc486/matplotlib/matplotlib/issues/7619 |
| og:image:alt | I find the current handling of background colors very non-intuitive: figure facecolor is not applied for savefig() by default figure facecolor is not applied setting frameon=False axis_bgcolor is n... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | darkdragon-001 |
| 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