# Math fonts not working after upgrading to MPL 1.0

I have trouble getting any symbols or any super/sub scripts to work
since I upgraded to 1.0 a few months ago. I always get a message
saying that some font isn't found. This occurs whenever I try to put
symbols, superscripts, or subscripts in a label, or when I use a log
scale (because then it MPL has to use superscripts). I have tried
changing my matplotlibrc file but haven't found any combination of
settings that help.

To illustrate the problem, I have included three files, one python
file and the other the error as captured from the output as well as my
matplotlibrc file. The python file is trivial:

# -------------------------------------------------
import matplotlib.pyplot as pyplot

pyplot.plot([1,2,3], label='$\alpha > \beta$')

pyplot.legend()
pyplot.show()
# -------------------------------------------------

running 10.6, python 2.6, matplotlib 1.0, and I have TeX installed.

Thanks,
Jeremy

mathfonterror.txt (12.9 KB)

mathfont.py (115 Bytes)

matplotlibrc (19 KB)

I have trouble getting any symbols or any super/sub scripts to work
since I upgraded to 1.0 a few months ago. I always get a message
saying that some font isn't found. This occurs whenever I try to put
symbols, superscripts, or subscripts in a label, or when I use a log
scale (because then it MPL has to use superscripts). I have tried
changing my matplotlibrc file but haven't found any combination of
settings that help.

To illustrate the problem, I have included three files, one python
file and the other the error as captured from the output as well as my
matplotlibrc file. The python file is trivial:

# -------------------------------------------------
import matplotlib.pyplot as pyplot

pyplot.plot([1,2,3], label='$\alpha > \beta$')

pyplot.legend()
pyplot.show()
# -------------------------------------------------

running 10.6, python 2.6, matplotlib 1.0, and I have TeX installed.

Works on my system if you use a raw string (note r before string):

pyplot.plot([1,2,3], label=r'$\alpha > \beta$')

-Tony

···

On Sep 8, 2010, at 11:56 AM, Jeremy Conlin wrote:

Unfortunately, no. When I use a raw string, I just get "*a@" instead
of the expected result. See attached figure for proof. I still get a
long list of errors of fonts not being found.

Jeremy

mathfont.pdf (8.59 KB)

···

On Wed, Sep 8, 2010 at 10:42 AM, Tony S Yu <tsyu80@...287...> wrote:

On Sep 8, 2010, at 11:56 AM, Jeremy Conlin wrote:

I have trouble getting any symbols or any super/sub scripts to work
since I upgraded to 1.0 a few months ago. I always get a message
saying that some font isn't found. This occurs whenever I try to put
symbols, superscripts, or subscripts in a label, or when I use a log
scale (because then it MPL has to use superscripts). I have tried
changing my matplotlibrc file but haven't found any combination of
settings that help.

To illustrate the problem, I have included three files, one python
file and the other the error as captured from the output as well as my
matplotlibrc file. The python file is trivial:

# -------------------------------------------------
import matplotlib.pyplot as pyplot

pyplot.plot([1,2,3], label='$\alpha > \beta$')

pyplot.legend()
pyplot.show()
# -------------------------------------------------

running 10.6, python 2.6, matplotlib 1.0, and I have TeX installed.

Works on my system if you use a raw string (note r before string):

pyplot.plot([1,2,3], label=r'$\alpha > \beta$')

It may not be an MPL issue, but rather Snow Leopard.

I have a friend who had font troubles, but it was because Mac OSX 10.6 (Snow Leopard) changed the way fonts are handled. He had a file in his home directory (which he created on 10.5) which had some font specifications, which he had to alter/remove to fix his trouble.

I can't remember any more details, but thought I would share in case this helps.

Andre

···

On Sep 8, 2010, at 8:56 AM, Jeremy Conlin wrote:

I have trouble getting any symbols or any super/sub scripts to work
since I upgraded to 1.0 a few months ago. I always get a message
saying that some font isn't found. This occurs whenever I try to put
symbols, superscripts, or subscripts in a label, or when I use a log
scale (because then it MPL has to use superscripts). I have tried
changing my matplotlibrc file but haven't found any combination of
settings that help.

To illustrate the problem, I have included three files, one python
file and the other the error as captured from the output as well as my
matplotlibrc file. The python file is trivial:

# -------------------------------------------------
import matplotlib.pyplot as pyplot

pyplot.plot([1,2,3], label='$\alpha > \beta$')

pyplot.legend()
pyplot.show()
# -------------------------------------------------

running 10.6, python 2.6, matplotlib 1.0, and I have TeX installed.

Thanks,
Jeremy
<mathfonterror.txt><mathfont.py><matplotlibrc>------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Hmm, that strange. All the fonts it says aren't found are fonts that should be included in the Matplotlib install. I have pretty much the same setup as you (OSX 10.6, python 2.6), although I'm on Matplotlib trunk. Is it possible your install got screwed up some how. Have you tried a clean install of Matplotlib?

If that doesn't work, I'm afraid I won't be of much help, since I can't really reproduce this on my system. Maybe, someone who knows the font system better can help.

Best,
-Tony

···

On Sep 8, 2010, at 2:10 PM, Jeremy Conlin wrote:

On Wed, Sep 8, 2010 at 10:42 AM, Tony S Yu <tsyu80@...287...> wrote:

On Sep 8, 2010, at 11:56 AM, Jeremy Conlin wrote:

I have trouble getting any symbols or any super/sub scripts to work
since I upgraded to 1.0 a few months ago. I always get a message
saying that some font isn't found. This occurs whenever I try to put
symbols, superscripts, or subscripts in a label, or when I use a log
scale (because then it MPL has to use superscripts). I have tried
changing my matplotlibrc file but haven't found any combination of
settings that help.

To illustrate the problem, I have included three files, one python
file and the other the error as captured from the output as well as my
matplotlibrc file. The python file is trivial:

# -------------------------------------------------
import matplotlib.pyplot as pyplot

pyplot.plot([1,2,3], label='$\alpha > \beta$')

pyplot.legend()
pyplot.show()
# -------------------------------------------------

running 10.6, python 2.6, matplotlib 1.0, and I have TeX installed.

Works on my system if you use a raw string (note r before string):

pyplot.plot([1,2,3], label=r'$\alpha > \beta$')

Unfortunately, no. When I use a raw string, I just get "*a@" instead
of the expected result. See attached figure for proof. I still get a
long list of errors of fonts not being found.

Jeremy
<mathfont.pdf>

It may not be an MPL issue, but rather Snow Leopard.

I have a friend who had font troubles, but it was because Mac OSX 10.6 (Snow Leopard) changed the way fonts are handled. He had a file in his home directory (which he created on 10.5) which had some font specifications, which he had to alter/remove to fix his trouble.

I can’t remember any more details, but thought I would share in case this helps.

Andre

···

On Wed, Sep 8, 2010 at 8:56 AM, Jeremy Conlin <jlconlin@…287…> wrote:

I have trouble getting any symbols or any super/sub scripts to work

since I upgraded to 1.0 a few months ago. I always get a message

saying that some font isn’t found. This occurs whenever I try to put

symbols, superscripts, or subscripts in a label, or when I use a log

scale (because then it MPL has to use superscripts). I have tried

changing my matplotlibrc file but haven’t found any combination of

settings that help.

To illustrate the problem, I have included three files, one python

file and the other the error as captured from the output as well as my

matplotlibrc file. The python file is trivial:

# -------------------------------------------------

import matplotlib.pyplot as pyplot

pyplot.plot([1,2,3], label=’$\alpha > \beta$’)

pyplot.legend()

pyplot.show()

# -------------------------------------------------

running 10.6, python 2.6, matplotlib 1.0, and I have TeX installed.

Thanks,

Jeremy

This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.

Enter the Intel® Threading Challenge 2010.