From: C M <cmp...@gm...> - 2007-12-14 18:05:32
|
On Dec 13, 2007 4:01 PM, Orest Kozyar <ore...@gm...> wrote: > I've been trying to set the font properties of the plots that I've > been making with matplotlib; however, there appears to be a problem > with font rendering. For example, when I check the properties of text > on the axes, etc, the font class is set to serif; however, the font in > the plot does not appear to be serif. I ran several of the font demos > in the matplotlib examples directory, and the fonts all looked the > same (except for size). Attached is the PNG of the fonts_demo.py > output. > > The only way I was able to get serif fonts was if I call: > > rc('text', usetex=True), and even then this only changes the fonts on > the axis tick labels. xlabel, ylabel still remain sans-serif. > > I'm sure I am missing something obvious, but have read through all the > documentation available on the matplotlib website regarding fonts, and > they don't seem to indicate that I need to install anything else. > > This is Python 2.5 on Windows XP. > > Thanks, > Orest > Not sure if this is your issue but I had problems with fonts until I uncommented the RC file in the fonts section of it. Matplotlib ships with the RC commented out. The file matplotlibrc is found in the matplotlib\mpl-data folder. You can just edit it with Notepad and uncomment the lines regarding fonts and try it again. |