|
From: John H. <jdh...@ac...> - 2006-01-22 13:31:13
|
>>>>> "Fernando" == Fernando Perez <Fer...@co...> writes:
Fernando> In [23]: p mp.value figure() plot([1,2,3]) title(r'Hello
Fernando> matplotlib: $x=1+\alpha')
I assume you have another dollar sign in there in real life?
Fernando> Running it any number of times, all the while changing
Fernando> this:
Fernando> In [28]: rc('font.latex',package='times')
Fernando> to 'times', 'helvetica', etc, produces no change in the
Fernando> generated picture. Is this setting supposed to be
Fernando> ignored? I see that
Fernando> http://www.scipy.org/wikis/topical_software/UsingTex
Fernando> mentions that these parameters can be changed 'before
Fernando> importing pylab'. Any reason why they can't be reset on
Fernando> the fly?
No, you should be able to change them on the fly. It turns out that
agg is also doing some caching of the generated images, and this is
where the problem was (there was also one in texmanager that I fixed
yesterday). I just committed some changes that are untested but
should work. FYI, the relevant bits of the code are texmanager's
get_prefix and backend_agg's draw_tex functions. Previously in agg I
was caching on
key = s, size, dpi, rgb, angle
and I added the rc info to the key
key = s, size, dpi, rgb, angle, rcParams['font.latex'],rcParams['text.tex.engine']
Fernando> AND, even worse, I'm getting consistently that if I
Fernando> select
Fernando> font.latex.package : helvetica
Fernando> produces a nasty error (I can send the full tb if
Fernando> needed):
Fernando> RuntimeError: _image_module::readpng could not open PNG
Fernando> file
Fernando> /home/fperez/.matplotlib/tex.cache/4c6661ae3b1f9211424cf72e05973891_120.png
Fernando> for reading
Flush the cache and reinstall from CVS and make sure you can repeat
this error after the newest fixes (probably still there but worth a
try). If so inspect the pointed to PNG file and see what is going on
with it: does it exist, does it have data in it, is it in fact a
readable png?
Cheers,
JDH
|