I just wanted to add: if i simply set the font to Arial, using rc('font',**{'family':'sans-serif','sans-serif':['Arial']})
then it works. But the same call with Helvetica still defaults to that Bitstream/default font of matplotlib. any idea why this might be? could matplotlib be confusing helvetica with bitstream? On Sun, Jun 28, 2009 at 11:28 AM, per freem <perfr...@gmail.com> wrote: > hi, > > i am trying to use the Helvetica font on matplotlib. i am using mac os x > (so i definitely have helvetica installed) with version 0.98.5.2 of > matplotlib. my code is: > > from scipy import * > import matplotlib > matplotlib.use('PDF') > from matplotlib import rc > import matplotlib.pyplot as plt > rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']}) > plt.hist(rand(100)) > xlabel(r"My x axis $\alpha$") > ylabel(r"My y axis $\beta$") > > i verified that plt.rcParams gets modified to use 'Helvetica' as the value > for font.family, etc. but i still get the default font used in all of these > figures. i tried using the PS backend using matplotlib.use('PS') but the > problem persists. i am interested in getting out PDFs that use helvetica > everywhere. > > does anyone know how to fix this? thank you. >
------------------------------------------------------------------------------
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users