Note
Go to the end to download the full example code.
Unicode minus#
By default, tick labels at negative values are rendered using a Unicode
minus (U+2212) rather than an ASCII hyphen (U+002D). This can be controlled
by setting rcParams["axes.unicode_minus"]
(default: True
).
The replacement is performed at draw time of the tick labels (usually during a
pyplot.show()
or pyplot.savefig()
call). Therefore, all tick labels of
the figure follow the same setting and we cannot demonstrate both glyphs on
real tick labels of the same figure simultaneously.
Instead, this example simply showcases the difference between the two glyphs in a magnified font.