Title: make subplots smarter with regards to subplot_kw and figure_kw · Issue #1460 · matplotlib/matplotlib · GitHub
Open Graph Title: make subplots smarter with regards to subplot_kw and figure_kw · Issue #1460 · matplotlib/matplotlib
X Title: make subplots smarter with regards to subplot_kw and figure_kw · Issue #1460 · matplotlib/matplotlib
Description: While working on #1458, it occurred to me that it might not be a bad idea to process the keyword arguments given to plt.subplots and pass them along in the appropriate direction. As I alluded to in #1458, currently, to replace lines like...
Open Graph Description: While working on #1458, it occurred to me that it might not be a bad idea to process the keyword arguments given to plt.subplots and pass them along in the appropriate direction. As I alluded to in...
X Description: While working on #1458, it occurred to me that it might not be a bad idea to process the keyword arguments given to plt.subplots and pass them along in the appropriate direction. As I alluded to in...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/1460
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"make subplots smarter with regards to subplot_kw and figure_kw","articleBody":"While working on #1458, it occurred to me that it might not be a bad idea to process the keyword arguments given to `plt.subplots` and pass them along in the appropriate direction. As I alluded to in #1458, currently, to replace lines like:\n\n fig = plt.figure(figsize=(10,20))\n ax = plt.subplot(111, axisbg='w')\n\nyou have to do an awkward thing to subplot's keyword arguments, since, `subplot*s*` passes its keyword arguments to plt.figure.\n\n```\nfig, ax = plt.subplots(figsize=(10,20), subplot_kw=dict(axisbg='w'))\n```\n\nbut, at least as I was going through our examples, all of the subplot keyword arguments were pretty unambiguously named, and could not be interpreted as figure keyword arguments. So there's no reason why we shouldn't make the next line work the same as the two examples above:\n\n```\nfig, ax = plt.subplots(figsize=(10,20), axisbg='w')\n```\n\nin our docs, plt.axes takes these kwargs:\n\n```\naxisbg color the axes background color\nframeon [True|False] display the frame?\nsharex otherax current axes shares xaxis attribute with otherax\nsharey otherax current axes shares yaxis attribute with otherax\npolar [True|False] use a polar axes?\n```\n\nand plt.subplot says it deals with `axisbg`, `polar`, and `projection`\n","author":{"url":"https://github.com/ivanov","@type":"Person","name":"ivanov"},"datePublished":"2012-11-08T05:06:52.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/1460/matplotlib/issues/1460"}
| 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:07391911-5552-c84c-5687-e5933759d80f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B11A:1DF5CE:2D8AD1:3BFC1B:6A522A54 |
| html-safe-nonce | 2d83376b0abda1b96decc1c20edf5f7ed95673559b5737a50c00b1762bddb261 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTFBOjFERjVDRToyRDhBRDE6M0JGQzFCOjZBNTIyQTU0IiwidmlzaXRvcl9pZCI6IjE4NTI0MjQ2NTc4ODM1MDcyODQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2f913f48e056f6ce87ea67a12d0684b86e03c821e70f630dc030cd7ccf558ba9 |
| hovercard-subject-tag | issue:8195017 |
| 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/1460/issue_layout |
| twitter:image | https://opengraph.githubassets.com/af57b26a89b059947fa603e60e9d7f3aaa8eea7f1e64946142ff0f7e90a2f308/matplotlib/matplotlib/issues/1460 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/af57b26a89b059947fa603e60e9d7f3aaa8eea7f1e64946142ff0f7e90a2f308/matplotlib/matplotlib/issues/1460 |
| og:image:alt | While working on #1458, it occurred to me that it might not be a bad idea to process the keyword arguments given to plt.subplots and pass them along in the appropriate direction. As I alluded to in... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ivanov |
| 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 | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width