To annotate my numbers in Greek letters in the matplotlib Python package, I use the following:
import matplotlib
matplotlib.use('PDF')
import matplotlib.pyplot as plt
from matplotlib import rc
rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
plt.rcParams['ps.useafm'] = True
rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
plt.rcParams['pdf.fonttype'] = 42
plt.xlabel(r'$\mu$ = 50')
plt.ylabel(r'$\sigma$ = 1.5')
This makes the character equal and everything to the right of it in the Helvetica font, as expected, and Greek characters by default have the regular TeX font (which, I think, Times New Roman.)
How can I make the font used for Greek letters instead be the font "Symbol"? It’s important for me not to appear in the default TeX font for Times.
thank you for your help.
source
share