Title: [MNT]: Streamline mpltoolkits.axes_grid.Grid API · Issue #27963 · matplotlib/matplotlib · GitHub
Open Graph Title: [MNT]: Streamline mpltoolkits.axes_grid.Grid API · Issue #27963 · matplotlib/matplotlib
X Title: [MNT]: Streamline mpltoolkits.axes_grid.Grid API · Issue #27963 · matplotlib/matplotlib
Description: Summary The current interface is neither very intuitive nor practical nor in line with the traditional gridspec logic. Proposed fix Half a note to self, because this is not completely thought through: The parameter ngrids seems not to be...
Open Graph Description: Summary The current interface is neither very intuitive nor practical nor in line with the traditional gridspec logic. Proposed fix Half a note to self, because this is not completely thought throu...
X Description: Summary The current interface is neither very intuitive nor practical nor in line with the traditional gridspec logic. Proposed fix Half a note to self, because this is not completely thought throu...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/27963
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[MNT]: Streamline mpltoolkits.axes_grid.Grid API","articleBody":"### Summary\n\nThe current interface is neither very intuitive nor practical nor in line with the traditional gridspec logic.\n\n### Proposed fix\n\nHalf a note to self, because this is not completely thought through:\n\n- The parameter `ngrids` seems not to be working (usage raises)\n- The attributes `ngrids` is not helpful. It's misnomed (naxes would be better), and it's equivalent to `len(grid)` or `len(grid.axes_all)`.\n- Not sure what we need `grid.axes_llc` for. That seems quite specific.\n- The 2D grid arrangement `axes_row`, `axes_column` are lists of lists. In contrast `subplots` returns an array. Thus, you need double indexing `grid.axes_row[row][col}` and cannot use the multi-index `axs[row, col]`.\n- Having the `direction` parameter and `grid.axes_row`, `grid.axes_column` is basically two redundant approaches towards ordering.\n\nPossible improvements:\n- \u003cs\u003edeprecate `ngrids` attribute\u003c/s\u003e - replaced by #27972\n- add an attribute `grid.axes` or maybe even `grid.axs` (in analogy to `fig, axs = plt.subplots(2, 3)`), which is a ndarray of the Axes. Hence one could do `grid.axs[row, column]`.\n- maybe (??) soft-deprecate axes_all, axes_row, axes_col, direction?\n- in `Grid.__init__` make everything after `nrows_ncols` kw-only\n- would be nice to have a default `rect`, but that requires reorganizing parameter order because that's before `nrows_ncols`.\n Might be possible migrate\n ```\n def __init__(self, fig, rect, nrows_ncols, *, ...)\n ```\n to \n ```\n def __init__(self, nrows_ncols, *, rect, ...)\n ```\n with reasonable deprecation warnings and catching inappropriate use. - But would have to think this through","author":{"url":"https://github.com/timhoffm","@type":"Person","name":"timhoffm"},"datePublished":"2024-03-22T16:00:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/27963/matplotlib/issues/27963"}
| 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:48016742-c91c-f093-815e-2b2547c7a7b3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E5F2:2348D5:59C804:79C8D1:6A5347EC |
| html-safe-nonce | 68b095cb0ae569b846dfb43845871225570a68a5c961dcbc5d50103e55986445 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNUYyOjIzNDhENTo1OUM4MDQ6NzlDOEQxOjZBNTM0N0VDIiwidmlzaXRvcl9pZCI6IjI3MDQyMDMzNzk0ODAxNTIwNDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a1333bd1bd602124ba80e029a964dd0f0ff48e9755f35b59ad04223e019e45ca |
| hovercard-subject-tag | issue:2202821017 |
| 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/27963/issue_layout |
| twitter:image | https://opengraph.githubassets.com/801ef8cb0fb07d6555fabf58ddb77dd13ea7284bd4c8aaf713d1213949b7abb0/matplotlib/matplotlib/issues/27963 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/801ef8cb0fb07d6555fabf58ddb77dd13ea7284bd4c8aaf713d1213949b7abb0/matplotlib/matplotlib/issues/27963 |
| og:image:alt | Summary The current interface is neither very intuitive nor practical nor in line with the traditional gridspec logic. Proposed fix Half a note to self, because this is not completely thought throu... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | timhoffm |
| 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 | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width