Matplotlib currently uses the "hyphen" character instead of a "minus
sign" when printing negative numbers in plots.

While these two characters are traditionally not distinguished in
monospaced fonts, there is a big difference in proportional fonts. A
hyphen (Unicode character 0x002d) is very short and used between words,
whereas a minus sign (Unicode: 0x2212) is much longer and looks exactly
like the horizontal part of a plus sign.

Practically all modern fonts do contain a minus sign. In those fonts
that still lack a minus sign, the (often slightly lower/thinner/longer)
"en dash" is usually a much less painful substitute than the hyphen.
[The PostScript standard encoding lacks a minus sign, but the PostScript
symbol font has one at 0x2d, as documented in
http://www.unicode.org/Public/MAPPINGS/VENDORS/ADOBE/symbol.txt ]

Example:

from pylab import *
plot([-3, -2, -1], [1,-3,-2])
title(u"wrong: -2..+2   correct: \u22122..+2")
show()

Is there a way to cause matplotlib to use the correct minus-sign glyph?
That would help to keep typographically very picky editors of scientific
journals happy ...

Markus

-- 
Markus Kuhn, Computer Laboratory, University of Cambridge
http://www.cl.cam.ac.uk/~mgk25/ || CB3 0FD, Great Britain


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to