JetBrains / lets-plot

Multiplatform plotting library based on the Grammar of Graphics
https://lets-plot.org
MIT License
1.57k stars 51 forks source link

Extra trim in formatted number when type='g' #1241

Closed ASmirnov-HORIS closed 3 days ago

ASmirnov-HORIS commented 3 days ago

Example:

d = 10
v = 3.14 * 10**d

ggplot() + geom_label(x=0, label=v, label_format=".8g")

Output:

Expected:

alshan commented 3 days ago

To keep zeroes you need to use '#' flag : label_format="#.8g"