Hi,
Did anyone have any insight on this? Alternatively, anyone know why there
has been little uptake on this question ...(apologies that it was
accidentally sent twice)?
Leo
On Tue, Feb 3, 2009 at 11:42 PM, Leo Trottier <l...@cogsci.ucsd.edu> wrote:
> Matplotlib 0.98.5.2
> Location: C:\leo\.matplotlib
> Running Windows XP SP2
> Obtained from pythonxy v. 2.1.10
> No rc customizations ...
>
> I've been having a devil of a time getting my rcParams to update
> mid-script. Perhaps this isn't possible, but if that's so, it's not
> entirely clear. Even if it is so, this is seemingly a defect, because in an
> interactive session one expects quite different behavior (and no amount of
> iPython %reset-ing seems to be able to help).
>
> Note that manually setting the font (or what have you) in *title* works
> fine.
>
> Here is some example code:
>
> ############## BEGIN #########
> import matplotlib
> from matplotlib import rc, rcParams, rcdefaults
> from matplotlib.pyplot import plot, show, figure, title
>
> print matplotlib.__version__
> print matplotlib.get_configdir()
> print
> print "rcParams['font.sans-serif']:", rcParams['font.sans-serif']
> print 'family is:', rcParams['font.family']
> print
> figure(4)
> title('This should be in a sans-serif font')
> show()
>
> rcParams['font.sans-serif'] = rcParams['font.monospace']
> print "rcParams['font.sans-serif']:", rcParams['font.sans-serif']
> print 'family is:', rcParams['font.family']
> print
> figure(1)
> title('This should be in a monospace font')
> show()
>
> rcParams['font.sans-serif'] = rcParams['font.serif']
> print "rcParams['font.sans-serif']:", rcParams['font.sans-serif']
> print 'family is:', rcParams['font.family']
> print
> figure(2)
> title('This should be in a serif font')
> show()
>
> rcdefaults()
> print "rcParams['font.sans-serif']:", rcParams['font.sans-serif']
> print 'family is:', rcParams['font.family']
> print
> figure(3)
> title('This should be back to a sans-serif font')
> show()
> ######### END ####################
>
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users