diff --git a/lib/matplotlib/ticker.py b/lib/matplotlib/ticker.py index a2be7cbd805e..982c867ec3b7 100644 --- a/lib/matplotlib/ticker.py +++ b/lib/matplotlib/ticker.py @@ -1140,7 +1140,7 @@ class PercentFormatter(Formatter): def __init__(self, xmax=100, decimals=None, symbol='%'): self.xmax = xmax + 0.0 self.decimals = decimals - self.symbol = symbol + self.symbol = symbol.replace('%', r'\%') if rcParams['text.usetex'] else symbol def __call__(self, x, pos=None): """