Title: Tweak AnnotationBbox coords specification. by anntzer · Pull Request #26069 · matplotlib/matplotlib · GitHub
Open Graph Title: Tweak AnnotationBbox coords specification. by anntzer · Pull Request #26069 · matplotlib/matplotlib
X Title: Tweak AnnotationBbox coords specification. by anntzer · Pull Request #26069 · matplotlib/matplotlib
Description: In AnnotationBbox, it makes sense to allow passing xycoords and boxcoords positionally, because (similarly to annotate()) something like AnnotationBbox(box, xy1, xy2, "axes transform", "offset points") (for example) actually reads better than AnnotationBbox(box, xy1, xy2, xycoords="axes transform", boxcoords="offset points") once you've seen this often enough and learn that the positional order is just (annotated_xy, box_xy, annotated_coords, box_coords). (The alternative that's fully explicit would be AnnotationBbox(box, xy=xy1, xybox=xy2, xycoords=..., boxcoords=...) but even that doesn't read too well because the xy kwargs names don't rhyme exactly with the coords names; or one could reorder the args to AnnotationBbox(box, xy=xy1, xycoords=..., xybox=xy2, boxcoords=...), but that's really a mouthful and doesn't help API usability.) So let's just allow passing the coordinate systems positionally (undoing the change in Matplotlib 3.6 that made them kwonly). The following kwargs do remain kwonly, though. In demo_text_path: xycoords defaults to "data" so doesn't need to be specified; xybox is not specified so boxcoords is not needed. PR summary PR checklist "closes #0000" is in the body of the PR description to link the related issue new and changed code is tested Plotting related features are demonstrated in an example New Features and API Changes are noted with a directive and release note Documentation complies with general and docstring guidelines
Open Graph Description: In AnnotationBbox, it makes sense to allow passing xycoords and boxcoords positionally, because (similarly to annotate()) something like AnnotationBbox(box, xy1, xy2, "axes transform", &q...
X Description: In AnnotationBbox, it makes sense to allow passing xycoords and boxcoords positionally, because (similarly to annotate()) something like AnnotationBbox(box, xy1, xy2, "axes transform&q...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/26069
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:514ca768-942d-532c-ff8b-3eed73df962c |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 86D4:170B77:C1675:104CCC:6A53277F |
| html-safe-nonce | d90adf5833fbc0480b1fa63d029e330fac30b9e537d45525ee7f18d15780d087 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NkQ0OjE3MEI3NzpDMTY3NToxMDRDQ0M6NkE1MzI3N0YiLCJ2aXNpdG9yX2lkIjoiODI0NTE5NDg1NjE3NzI4MDg5NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | bde3392f579caabbf57dcb3ddec754e878eaa509c55a3246798d650f2ae696d1 |
| hovercard-subject-tag | pull_request:1377811328 |
| 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/26069/files |
| twitter:image | https://avatars.githubusercontent.com/u/1322974?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1322974?s=400&v=4 |
| og:image:alt | In AnnotationBbox, it makes sense to allow passing xycoords and boxcoords positionally, because (similarly to annotate()) something like AnnotationBbox(box, xy1, xy2, "axes transform", &q... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width