Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 736ac0c

Browse files
authored
Merge pull request #19696 from meeseeksmachine/auto-backport-of-pr-19665-on-v3.4.x
Backport PR #19665 on branch v3.4.x (Changed FormatStrFormatter documentation to include how to get unicode minus)
2 parents d6d78a5 + 41fc69d commit 736ac0c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/matplotlib/ticker.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,10 @@ class FormatStrFormatter(Formatter):
411411
412412
The format string should have a single variable format (%) in it.
413413
It will be applied to the value (not the position) of the tick.
414+
415+
Negative numeric values will use a dash not a unicode minus,
416+
use mathtext to get a unicode minus by wrappping the format specifier
417+
with $ (e.g. "$%g$").
414418
"""
415419
def __init__(self, fmt):
416420
self.fmt = fmt

0 commit comments

Comments
 (0)