Title: [ENH]: Add f-string formatting to labels in `Axes.bar_label()` · Issue #23689 · matplotlib/matplotlib · GitHub
Open Graph Title: [ENH]: Add f-string formatting to labels in `Axes.bar_label()` · Issue #23689 · matplotlib/matplotlib
X Title: [ENH]: Add f-string formatting to labels in `Axes.bar_label()` · Issue #23689 · matplotlib/matplotlib
Description: Problem I would like to be able to use a format string like ,d to format bar labels with commas for the thousands separators. Proposed solution Update the fmt parameter to also accept f-string style formats. To format the label, we first...
Open Graph Description: Problem I would like to be able to use a format string like ,d to format bar labels with commas for the thousands separators. Proposed solution Update the fmt parameter to also accept f-string styl...
X Description: Problem I would like to be able to use a format string like ,d to format bar labels with commas for the thousands separators. Proposed solution Update the fmt parameter to also accept f-string styl...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/23689
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[ENH]: Add f-string formatting to labels in `Axes.bar_label()` ","articleBody":"### Problem\n\nI would like to be able to use a format string like `,d` to format bar labels with commas for the thousands separators.\n\n### Proposed solution\n\nUpdate the `fmt` parameter to also accept f-string style formats. To format the label, we first check what kind of format is provided and call `fmt.format(value)` or `fmt % value` accordingly.","author":{"url":"https://github.com/stefmolin","@type":"Person","name":"stefmolin"},"datePublished":"2022-08-20T22:40:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/23689/matplotlib/issues/23689"}
| 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:773e6dec-e942-560c-37bf-30a26d0067a2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B81C:288515:3C6E26:4F7C5E:6A52F9B7 |
| html-safe-nonce | 0280b5941159b969d1fbd2b386b276703fa9ba972070cfc2a94e31d26af7c7cd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODFDOjI4ODUxNTozQzZFMjY6NEY3QzVFOjZBNTJGOUI3IiwidmlzaXRvcl9pZCI6IjI2NTM4OTAwNTM4MTA2MTY3NTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 346485e4bd837f9f895f0d1831991a3f1a2effd6987a09884c67b014be502a11 |
| hovercard-subject-tag | issue:1345314743 |
| 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/23689/issue_layout |
| twitter:image | https://opengraph.githubassets.com/046eaff22393ca650dfdad54acc8d40f38f4318b15d2d5a1e0765782ef0d6fb1/matplotlib/matplotlib/issues/23689 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/046eaff22393ca650dfdad54acc8d40f38f4318b15d2d5a1e0765782ef0d6fb1/matplotlib/matplotlib/issues/23689 |
| og:image:alt | Problem I would like to be able to use a format string like ,d to format bar labels with commas for the thousands separators. Proposed solution Update the fmt parameter to also accept f-string styl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | stefmolin |
| 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