python - Negative numbers don't display correctly in matplotlib xkcd style -
I'm playing with the xkcd style feature in matlotlib. I have Matplotlib 1.4, and without the humor the font is properly installed, or at least works in msword.
When I run the following example code, do I "?" At any time on the label there should be a negative number instead of "-" with any idea what is this?
with plt.xkcd (): plt.figure () plt.plot (np.sin (np.linspace (0, 10))) plt.title ('wow ho !!! ')
Besides, reputation is now enough to post an image as you can see that everything is expected only, which is expected beyond those tragedy question marks.
Ericsson comments are correct. Thus, you have to add the MINUS SIGN (U + 2212) character for the xkcd font (without the predator) To do this, use the font editor (I used):
- Font forward menu From, open the humor Sans ttf file. Copy the copy HYPHEN-MINUS (U + 002D) glouf in the MINUS SIGN (U + 2212) character box (ordering them to increase the Unicode number).
- Go to File - & gt; Generate the font Select the correct type (.tf) and save it in a separate folder compared to its own folder folders.
- Install the newly saved font (on Windows, double click to open a preview window, then click Install)
I had problems similar to yours and It had solved.
Comments
Post a Comment