From 4dffb91c750235ed460ad69b4e2b0d8a574c0cbd Mon Sep 17 00:00:00 2001 From: fuck Date: Sun, 7 Mar 2021 23:38:05 +0000 Subject: [PATCH 1/2] Changed FormatStrFormatter documentation to include how to get unicode minus --- lib/matplotlib/ticker.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/matplotlib/ticker.py b/lib/matplotlib/ticker.py index 354e3db880b4..8d347aa002f7 100644 --- a/lib/matplotlib/ticker.py +++ b/lib/matplotlib/ticker.py @@ -411,6 +411,10 @@ class FormatStrFormatter(Formatter): The format string should have a single variable format (%) in it. It will be applied to the value (not the position) of the tick. + + Negative numeric values will use a dash not a unicode minus, + use mathtext to get a unicode minus by wrappping the format specifier + with $ (e.g. $%g$). """ def __init__(self, fmt): self.fmt = fmt From 462f1af49fc5148c4666c66556353a9eccd26569 Mon Sep 17 00:00:00 2001 From: fuck Date: Wed, 10 Mar 2021 19:49:56 +0000 Subject: [PATCH 2/2] Marked example as string --- lib/matplotlib/ticker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/ticker.py b/lib/matplotlib/ticker.py index 8d347aa002f7..430d6112780b 100644 --- a/lib/matplotlib/ticker.py +++ b/lib/matplotlib/ticker.py @@ -414,7 +414,7 @@ class FormatStrFormatter(Formatter): Negative numeric values will use a dash not a unicode minus, use mathtext to get a unicode minus by wrappping the format specifier - with $ (e.g. $%g$). + with $ (e.g. "$%g$"). """ def __init__(self, fmt): self.fmt = fmt