Skip to content

Accept additional string formatting styles in sankey #19133

@CharlesHe16

Description

@CharlesHe16

Currently, Sankey class accepts number formatting for labels using the old printf string formatting.

I think the relevant line is here:

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

No one assigned

    Labels

    Good first issueOpen a pull request against these issues if there are no active ones!New feature

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy