From: Gary R. <gr...@bi...> - 2005-07-30 12:57:21
|
Hi Kristen, Last time I looked (a couple of weeks ago), there were problems in this area of matplotlib with LaTeX not being invoked properly. Can you please tell us what version of Windows, matplotlib and which LaTeX distribution you are using. I was intending to have another look at the code in a week or so from now. I'm unable to spend time on it until then. However, it looks like someone has made more recent changes to the relevant code, so I'd encourage you to try the latest version of matplotlib if the version you're using is more that a couple of weeks old. You may find that the problem you are seeing has been fixed. Please report back if you have success after doing this. Gary R. kristen kaasbjerg wrote: > Dear John > > When running the tex_demo.py script I just get a gray > figure canvas (no curves or anything) and the > following error message: > __________________________________________________ > Exception in Tkinter callback > Traceback (most recent call last): > File "C:\Python24\lib\lib-tk\Tkinter.py", line 1345, > in __call__ > return self.func(*args) > File > "C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py", > line 148, in resize > self.show() > File > "C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py", > line 151, in draw > FigureCanvasAgg.draw(self) > File > "C:\Python24\Lib\site-packages\matplotlib\backends\backend_agg.py", > line 381, in draw > self.figure.draw(renderer) > File > "C:\Python24\Lib\site-packages\matplotlib\figure.py", > line 511, in draw > for a in self.axes: a.draw(renderer) > File > "C:\Python24\Lib\site-packages\matplotlib\axes.py", > line 1387, in draw > self.xaxis.draw(renderer) > File > "C:\Python24\Lib\site-packages\matplotlib\axis.py", > line 552, in draw > tick.draw(renderer) > File > "C:\Python24\Lib\site-packages\matplotlib\axis.py", > line 151, in draw > if self.label1On: self.label1.draw(renderer) > File > "C:\Python24\Lib\site-packages\matplotlib\text.py", > line 848, in draw > self._mytext.draw(renderer) > File > "C:\Python24\Lib\site-packages\matplotlib\text.py", > line 335, in draw > bbox, info = self._get_layout(renderer) > File > "C:\Python24\Lib\site-packages\matplotlib\text.py", > line 184, in _get_layout > w,h = renderer.get_text_width_height( > File > "C:\Python24\Lib\site-packages\matplotlib\backends\backend_agg.py", > line 241, in get_text_width_height > Z = self.texmanager.get_rgba(s, size, dpi, rgb) > File > "C:\Python24\Lib\site-packages\matplotlib\texmanager.py", > line 296, in get_rgba > X = readpng(pngfile) > RuntimeError: _image_module::readpng could not open > PNG file C:\Documents and > Settings\Kristen\.matplotlib\tex.cache\30565a8911a6bb487e3745c0ea3c8224_96.png > for reading > ______________________________________________________ > > Any idea of what I'm missing?? > > Kristen |