Title: [MNT]: consistent formatting arguments · Issue #23694 · matplotlib/matplotlib · GitHub
Open Graph Title: [MNT]: consistent formatting arguments · Issue #23694 · matplotlib/matplotlib
X Title: [MNT]: consistent formatting arguments · Issue #23694 · matplotlib/matplotlib
Description: Summary I think it would be good to have consistent standards on allowable values for formatting arguments. As far as I can tell, the argument in #15602, which went in in 3.4, is to not add an f-string version for consistency with the li...
Open Graph Description: Summary I think it would be good to have consistent standards on allowable values for formatting arguments. As far as I can tell, the argument in #15602, which went in in 3.4, is to not add an f-st...
X Description: Summary I think it would be good to have consistent standards on allowable values for formatting arguments. As far as I can tell, the argument in #15602, which went in in 3.4, is to not add an f-st...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/23694
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[MNT]: consistent formatting arguments","articleBody":"### Summary\n\nI think it would be good to have consistent standards on allowable values for formatting arguments. As far as I can tell, the argument in #15602, which went in in 3.4, is to not add an f-string version for consistency with the library, but starting in 3.3, f-strings became valid direct input into tick formatters\r\n\r\n\r\nThis issue is inspired by #23690 but I didn't want to clobber that discussion with a hashing out of formatting.\n\n### Proposed fix\n\nOne consistent standard for all the free text formatting functionality - ticks, cursers, and artist labeling like bar/contour/etc. The upside is then I think we can move all the fmt argument parsing to one function/module so messy things like distinguishing % from an fstring happen in one place.\n\nMy bias is that most of the formatting arguments should take\n1. format (new and old)\n2. callable, \n3. [most of the tick formatters](https://matplotlib.org/devdocs/api/ticker_api.html?highlight=ticker#tick-formatting) since the tick formatters act on a single tick value at a time and are therefore (mostly? pos seems to always be optional) not really tick specific. \n\n_heavily edited to try and make my proposal clearer_","author":{"url":"https://github.com/story645","@type":"Person","name":"story645"},"datePublished":"2022-08-21T04:53:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/23694/matplotlib/issues/23694"}
| 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:02fb5301-291d-3477-d4f9-f5a773bb5b99 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C54C:2D523B:255FA86:331FB5F:6A53A8B6 |
| html-safe-nonce | f2d360d25fe4878980e01bf38b8aae325b3d2e8baf961d36a34e6a52886c37a3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTRDOjJENTIzQjoyNTVGQTg2OjMzMUZCNUY6NkE1M0E4QjYiLCJ2aXNpdG9yX2lkIjoiNTE4NDQ2MzczNDk3OTE0Mzg2MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4b43189a23015888b2e4763ff7930c9c6813bc9274cc9157db4ac70c389f1ff9 |
| hovercard-subject-tag | issue:1345385850 |
| 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/23694/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ce65290194498d1e33266a4f3ac5af5ea683225bc2409cbc966c4db107f96a28/matplotlib/matplotlib/issues/23694 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ce65290194498d1e33266a4f3ac5af5ea683225bc2409cbc966c4db107f96a28/matplotlib/matplotlib/issues/23694 |
| og:image:alt | Summary I think it would be good to have consistent standards on allowable values for formatting arguments. As far as I can tell, the argument in #15602, which went in in 3.4, is to not add an f-st... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | story645 |
| 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