Using different font (Gentium) for Matplotlib plots
<p>I'm trying to use Gentium Plus as the main font in matplotlib, especially for the numbers.
The following works in order to use Palatino for everything, which is fine for the math font.</p>

<pre><code>import matplotlib.pyplot as plt
font = {'family': 'serif', 'serif': ['Palatino'], 'size': 10}
plt.rc('font', **font)
plt.rc('text', usetex=True)
</code></pre>

<p>But I would like to have Gentium Plus for the text font and numbers. Is this possible?</p>

<p>You can check the available fonts in matplotlib by the following..</p>

<pre><code>import matplotlib.font_manager
list = matplotlib.font_manager.get_fontconfig_fonts()
names = [matplotlib.font_manager.FontProperties(fname=fname).get_name() for fname in list]
print names
</code></pre>

<p>To check for more options you can check the <a href="http://matplotlib.org/api/font_manager_api.html" rel="nofollow">documentation</a></p>

python matplotlib fonts