-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Labels
Good first issueOpen a pull request against these issues if there are no active ones!Open a pull request against these issues if there are no active ones!New feature
Milestone
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.unit |
F-strings seem to be preferred over this format (you probably know this already but here's some reasons). A specific reason is that I can't easily use thousands separator with the old printf format, while this is trivial with f-strings.
I can rewrite this pretty easily by changing the parameter to format for an f string, as described here.
Can I put in a pull request thingy? Or is there a particular reason for this old format?
Metadata
Metadata
Assignees
Labels
Good first issueOpen a pull request against these issues if there are no active ones!Open a pull request against these issues if there are no active ones!New feature