From: Yi Shang [mailto:mirandaisb...@gmail.com] 
Sent: Friday, August 27, 2010 15:34

from numpy import *
from matplotlib import pyplot as plt
import pylab
params = {'font.size' : 16,
          'axes.labelsize' : 16,
          'font.style' : 'normal',
          'font.family' : 'sans-serif',
        'font.sans-serif' : 'Arial'
}
pylab.rcParams.update(params)

By the way, the update() method above bypasses the validation [1] provided by
the RcParams class. Thus you must take care to give a list of font names for
font.sans-serif and other font families. If you use

for (k, v) in {'font.sans-serif': 'Arial'}.items():
    plt.rcParams[k] = v

or

plt.rc('font', **{'sans-serif': 'Arial'})

then your parameters will be validated, a process that automatically encloses
into a list font names given for families.

[1]
http://matplotlib.sourceforge.net/users/customizing.html#dynamic-rc-settings

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to