Title: ENH: Introduce compass-notation for legend by ImportanceOfBeingErnest · Pull Request #12679 · matplotlib/matplotlib · GitHub
Open Graph Title: ENH: Introduce compass-notation for legend by ImportanceOfBeingErnest · Pull Request #12679 · matplotlib/matplotlib
X Title: ENH: Introduce compass-notation for legend by ImportanceOfBeingErnest · Pull Request #12679 · matplotlib/matplotlib
Description: PR Summary Legend locations (loc) can currently be given as strings (like "upper left") or numbers (like 2). Both have the drawback that they are hard to remember. Some arguments are exchanged about this in #11174 Is it “top” or “upper”, “bottom” or “lower”, “Center”, “centre”, or “middle”? I’d have to look it up. Additionally, the numbers don't even have a reasonable order: 2 9 1 6 10 7 3 8 4 Also, there is a recent stackoverflow question "Legend location, similar to telephone", asking why not order the numbers like on a phone. A possible solution was proposed by @efiring to use a compass notation. Also, the new inset locator uses compass notation. This PR introduces this compass notation, (e.g. loc="NW") NW N NE W C E SW S SE in addition to the existing location strings and codes for legend. PR Checklist Has Pytest style unit tests Code is Flake 8 compliant New features are documented, with examples if plot related Documentation is sphinx and numpydoc compliant Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there) Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way
Open Graph Description: PR Summary Legend locations (loc) can currently be given as strings (like "upper left") or numbers (like 2). Both have the drawback that they are hard to remember. Some arguments are exch...
X Description: PR Summary Legend locations (loc) can currently be given as strings (like "upper left") or numbers (like 2). Both have the drawback that they are hard to remember. Some arguments ...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/12679
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:e473b0c9-6edd-62b8-3e6d-b32572441cbe |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | DFE8:238281:445828:5B2C47:6A52FC8B |
| html-safe-nonce | 8f092a4bfdfc938df0486ae356bb5665bc13f6754150858a68dcc3bad5a2994f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERkU4OjIzODI4MTo0NDU4Mjg6NUIyQzQ3OjZBNTJGQzhCIiwidmlzaXRvcl9pZCI6Ijg1MzU5MjQ3MDE0MzE3OTA3MzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d5882e5bd1bca829d2b0181c676263f3f25672a3e5ee345acd2bcfb11cff9590 |
| hovercard-subject-tag | pull_request:227080639 |
| 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/12679/files |
| twitter:image | https://avatars.githubusercontent.com/u/23121882?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/23121882?s=400&v=4 |
| og:image:alt | PR Summary Legend locations (loc) can currently be given as strings (like "upper left") or numbers (like 2). Both have the drawback that they are hard to remember. Some arguments are exch... |
| 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