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 !!! ')   

Enter image details here

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):

  1. 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).
  2. 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.
  3. 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

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -