|
From: Darren D. <dd...@co...> - 2006-01-22 17:38:40
|
On Sunday 22 January 2006 12:15 pm, you wrote:
> >>>>> "Darren" == Darren Dale <dd...@co...> writes:
>
> Darren> I fixed a bad rcParams key in backend_agg (fixed in cvs),
> Darren> but I still cant change the fonts on the fly. That got me
> Darren> thinking, isn't it the case that any rcParams need to be
> Darren> changed before importing from pylab, or has this
> Darren> requirement changed? John's changes do work if you make rc
> Darren> changes before importing from pylab.
>
> rcParams is just a dict, so you can modify it and have the changes
> work w/o restarting pylab. As long as the dict is being read in a
> function (and not at the module import level) then you should have no
> trouble changing rc on the fly as long as we get the cache keys right.
>
> I think the changes I made to backend agg should work, but testing
> will be the final arbiter. Are you seeing problems with CVS chcked
> out today?
in ipython -pylab, I tried something along the lines of:
from matplotlib import rcParams
# pslatex is my default latex font package
figure()
title(r'hello matplotlib: $x=e^{i\pi\theta}$')
savefig('pslatex.eps')
rcParams['font.latex.package']='type1cm'
figure()
title(r'hello matplotlib: $x=e^{i\pi\theta}$')
savefig('type1cm.eps')
Both of these figures look the same on screen, but type1cm is used in the
epsfile. Does backend_agg read the rcParams dict during module import only?
That might explain this behavior...
Darren
|