Title: Accept additional string formatting styles in sankey · Issue #19133 · matplotlib/matplotlib · GitHub
Open Graph Title: Accept additional string formatting styles in sankey · Issue #19133 · matplotlib/matplotlib
X Title: Accept additional string formatting styles in sankey · Issue #19133 · matplotlib/matplotlib
Description: Currently, Sankey class accepts number formatting for labels using the old printf string formatting. I think the relevant line is here: matplotlib/lib/matplotlib/sankey.py Line 742 in a02ffbc quantity = self.format % abs(number) + self.u...
Open Graph Description: Currently, Sankey class accepts number formatting for labels using the old printf string formatting. I think the relevant line is here: matplotlib/lib/matplotlib/sankey.py Line 742 in a02ffbc quant...
X Description: Currently, Sankey class accepts number formatting for labels using the old printf string formatting. I think the relevant line is here: matplotlib/lib/matplotlib/sankey.py Line 742 in a02ffbc quant...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/19133
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Accept additional string formatting styles in sankey","articleBody":"Currently, Sankey class accepts number formatting for labels using the old printf string formatting. \r\n\r\nI think the relevant line is here:\r\n\r\nhttps://github.com/matplotlib/matplotlib/blob/a02ffbcd898793c95de66d3bdb4dc0a8b6c5a3d0/lib/matplotlib/sankey.py#L742\r\n\r\nF-strings seem to be preferred over this format (you probably know this already but here's [some reasons](https://realpython.com/python-formatted-output/)). A specific reason is that I can't easily use thousands separator with the old printf format, while this is trivial with f-strings.\r\n\r\nI can rewrite this pretty easily by changing the parameter to format for an f string, [as described here](https://stackoverflow.com/a/54780825).\r\n\r\nCan I put in a pull request thingy? Or is there a particular reason for this old format?","author":{"url":"https://github.com/CharlesHe16","@type":"Person","name":"CharlesHe16"},"datePublished":"2020-12-17T01:08:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":26},"url":"https://github.com/19133/matplotlib/issues/19133"}
| 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:1aa18257-48de-c286-f016-6627ef6af7df |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DD34:1BA1D0:EA43F:130700:6A52EBC3 |
| html-safe-nonce | cbd4b7e7929644bf79701d82ede955022402a68a766c1b6f060eb577352ab305 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERDM0OjFCQTFEMDpFQTQzRjoxMzA3MDA6NkE1MkVCQzMiLCJ2aXNpdG9yX2lkIjoiNTY2OTQyMjI4MzUxMDQ0Mjk0NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7ab43f121537a8a53ea98129f2525f98fb659e74d472d978bd767f52ab4130e6 |
| hovercard-subject-tag | issue:769393578 |
| 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/19133/issue_layout |
| twitter:image | https://opengraph.githubassets.com/50af0e62a106e0cd9a388dbde23fa0d823a55901d1dd264917e09246003a8045/matplotlib/matplotlib/issues/19133 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/50af0e62a106e0cd9a388dbde23fa0d823a55901d1dd264917e09246003a8045/matplotlib/matplotlib/issues/19133 |
| og:image:alt | Currently, Sankey class accepts number formatting for labels using the old printf string formatting. I think the relevant line is here: matplotlib/lib/matplotlib/sankey.py Line 742 in a02ffbc quant... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | CharlesHe16 |
| 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