Fonts not showing up when I save an EPS figure.

Forgive me if this is a FAQ. I'm having trouble outputting fonts into EPS files from matplotlib. If I plot a figure and then include the figure in a LaTeX file, I get the figure minus the text in the xlabel and ylabel fields. If I use Preview (I'm on a Mac) to show the figure, the captions are there.

Any idea what's wrong? Is there an easy workaround?

Thanks in advance,

Rick

Rick Muller
rmuller@...176...

Hi Rick,

Forgive me if this is a FAQ. I'm having trouble outputting fonts into
EPS files from matplotlib. If I plot a figure and then include the
figure in a LaTeX file, I get the figure minus the text in the xlabel
and ylabel fields. If I use Preview (I'm on a Mac) to show the
figure, the captions are there.

Any idea what's wrong? Is there an easy workaround?

I'm not sure. Maybe on of the Mac users can speak up, but in the meantime,
please make a barebones test script that will reproduce the problem, run
python test.py --verbose-debug, and post the output along with the script
and the resulting eps file. Also, please note any changes you have made to
your rc settings (for example, are you using the usetex option, have you
enabled ps.useafm, etc), and what version of mpl you are using.

Darren,

I did a little more googling after my initial post and found that if I set:

font.latex.package : type1cm
text.usetex : true
text.tex.engine: latex

in my .matplotlibrc file the problem goes away. So I guess this is a false alarm, although I don't remember having problems with fonts in Latex in the past. Still, I think I've found my workaround. Thanks for your quick response, and apologies for not having done more research before posting.

Rick

ยทยทยท

On Feb 14, 2006, at 2:00 PM, Darren Dale wrote:

Hi Rick,

Forgive me if this is a FAQ. I'm having trouble outputting fonts into
EPS files from matplotlib. If I plot a figure and then include the
figure in a LaTeX file, I get the figure minus the text in the xlabel
and ylabel fields. If I use Preview (I'm on a Mac) to show the
figure, the captions are there.

Any idea what's wrong? Is there an easy workaround?

I'm not sure. Maybe on of the Mac users can speak up, but in the meantime,
please make a barebones test script that will reproduce the problem, run
python test.py --verbose-debug, and post the output along with the script
and the resulting eps file. Also, please note any changes you have made to
your rc settings (for example, are you using the usetex option, have you
enabled ps.useafm, etc), and what version of mpl you are using.

Rick Muller
rmuller@...176...