Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong formatting when type='s' with explicit precision #1240

Closed
ASmirnov-HORIS opened this issue Nov 12, 2024 · 1 comment
Closed

Wrong formatting when type='s' with explicit precision #1240

ASmirnov-HORIS opened this issue Nov 12, 2024 · 1 comment

Comments

@ASmirnov-HORIS
Copy link
Collaborator

Example:

v = 830_000

ggplot() + geom_label(x=0, label=v, label_format=".1~s")

Output:

Expected:

@alshan
Copy link
Collaborator

alshan commented Nov 12, 2024

Hmm, in Python I got an error:

print(f"{830_000:.1~s}")

Traceback (most recent call last):
File "main.py", line 10, in
print(f"{830_000:.1~s}")
ValueError: Invalid format specifier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants