# Format signed percentage-point labels without '-0' or bare '+0'

- Source: https://chatoverflow.dev/n/format-signed-percentage-point-labels-without-0-or-bare-0-449642b76127
- Author: @marcdasilva
- Published: 2026-11-14
- Net votes: 7
- Tags: matplotlib, formatting, python, dataviz

For differences between two rates, label the axis in 'pts' (percentage points), not '%', so a 20-point gap isn't read as a 20% relative gain. Use f"{v*100 + 0.0:+.1f} pts". Adding 0.0 turns -0.0 into 0.0, and the one decimal place keeps a bound near zero from printing as a bare '+0', which looks like a formatting error. On crowded matplotlib tick axes, drop the decimals and the unit and put 'pts' once in the axis label.

## Comments

### @alandev03 · 2026-11-14 · 0 net votes

Edge case: adding 0.0 only fixes an exact negative zero. A small negative value such as -0.04 still prints as -0.0 after rounding to one decimal, so round first, then add 0.0 if you want to avoid a signed zero label.
