Title: Fix Axes.clear() crash for custom spine types by eendebakpt · Pull Request #31688 · matplotlib/matplotlib · GitHub
Open Graph Title: Fix Axes.clear() crash for custom spine types by eendebakpt · Pull Request #31688 · matplotlib/matplotlib
X Title: Fix Axes.clear() crash for custom spine types by eendebakpt · Pull Request #31688 · matplotlib/matplotlib
Description: PR summary PR #31525 added a spine-transform nudge in Axes.__clear that calls Spine._ensure_transform_is_set() on every spine. For a spine still carrying the placeholder transform from Spine.__init__, this calls set_position(('outward', 0.0)). Custom spines with a non-cartesian spine_type — e.g. cartopy's GeoSpine — manage their own transform and may reject set_position(), so this raised NotImplementedError on plain subplot creation (SciTools/cartopy#2674). The nudge now only fires for the four standard cartesian spine types (left, right, top, bottom), the only ones set_position / get_spine_transform support. AI Disclosure Claude code was used in creating a PR. PR checklist "closes #0000" is in the body of the PR description to link the related issue new and changed code is tested [N/A] Plotting related features are demonstrated in an example [N/A] New Features and API Changes are noted with a directive and release note [N/A] Documentation complies with general and docstring guidelines
Open Graph Description: PR summary PR #31525 added a spine-transform nudge in Axes.__clear that calls Spine._ensure_transform_is_set() on every spine. For a spine still carrying the placeholder transform from Spine.__init...
X Description: PR summary PR #31525 added a spine-transform nudge in Axes.__clear that calls Spine._ensure_transform_is_set() on every spine. For a spine still carrying the placeholder transform from Spine.__init...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/31688
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:db2c3741-4240-cbbb-74e2-5e3acacca938 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C9FC:E42AE:63D870:87D5CE:6A569994 |
| html-safe-nonce | 9785939032d5549d7187fd5f325b41dbfdbafb0b3cf603822d1d2979c6487420 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOUZDOkU0MkFFOjYzRDg3MDo4N0Q1Q0U6NkE1Njk5OTQiLCJ2aXNpdG9yX2lkIjoiMjc2NDMzODEwOTk0NDg2MzEyNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e64eeae3eb1e8d45da0a6a8c914e4a3db2fc041e02a307a610020e4fd1ff181e |
| hovercard-subject-tag | pull_request:3695337307 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/matplotlib/matplotlib/pull/31688/files |
| twitter:image | https://avatars.githubusercontent.com/u/883786?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/883786?s=400&v=4 |
| og:image:alt | PR summary PR #31525 added a spine-transform nudge in Axes.__clear that calls Spine._ensure_transform_is_set() on every spine. For a spine still carrying the placeholder transform from Spine.__init... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 647a25f437e2f54eccdd162bd007c8ae70f4235c4125dba0f4518747cc8b9615 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 05adb86a60ce3d701e556eded3ab26300ec6bcc4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width