Darren Dale <[EMAIL PROTECTED]> writes:

> On Thursday 17 May 2007 10:08:06 am Alexander Schmolck wrote:
>> "George Nurser" <[EMAIL PROTECTED]> writes:
>> > I didn't realize that!
>> > Apologies for being ignorant here.
>>
>> No worries, here's a concrete example for selecting Helvetica (and
>> commented out, Palatino) as default fonts:
>>
>>     from matplotlib.pylab import *
>>     from numpy import *
>>     #rc('font',**dict(family='serif',serif='Palatino'))
>>     rc('font',**{'family':'sans-serif','sans-serif':'Helvetica'})
>>     rc('text', usetex=True)
>>
>> Note that I've had problems with font-changes being ignored by latex in
>> some version of matplotlib, but not the latest 0.9 -- if in doubt
>> ``rm -r ~/.matplotlib/*cache`` and see whether that fixes things.
>
> You should also make your rc changes before importing pylab. 

OK, I think it's rather important to ntoe that on the tutorial. I'll do so
later.

> That might be considered a bug, and would take some work to fix.

I've really got to run now but I might look into submitting a patch later; I
think it should'n be that hard: make TexManager._font_config a property that
on setting remembers the contents of the rcParams that are relevant to it and
on accessing reinits itself if it finds they've changed. Does that sound
plausbile to you?

>
>> I've added these two things to
>>
>>  <http://www.scipy.org/Cookbook/Matplotlib/UsingTex>
>>
>> Hope that's OK, otherwise please revert.
>
> Would you mind changing it to use the rcParams dict instead of the rc 
> function? It is clearer that way.

I'd be happy to, but I don't quite understand: Should I also change the other
uses of rc on the page to rcParams? Isn't using rc equivalent except that it
also performs some error checking and alias conversion? Why is it better to
modify rcParams directly?


cheers,

'as

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to