Create short scale format for numbers in the legend
short_scale(x, digits = 3)
x
The number
digits
Significant digits
Johannes Mast, credit: https://stackoverflow.com/a/59086755