From: Jean P. <2s...@ma...> - 2004-09-06 21:50:10
|
Hello, I'm a new user of matplotlib and I have to admit that I'm quite impressed and excited about it ! I'm currently trying to convince the whole company to switch from matlab to python (at least 200 users I think), and matplotlib is a big asset. If it's a success, as a big supporter of free software, I hope to convince the company to make some donations to python and/or matplotlib...(matlab licence are really expensive...) Anyway, at the moment I can't make any donation, but I can at least help to improve matplotlib, so here are the problems I've found : I began with version 0.60.2 and everything worked out of the box with either linux or windows NT4. But when trying to display several plot on the same window, I had some text overlapping so after a while I've decided to switch to 0.62.4 to see if things has improved. But it seems that everything was broken ! I cannot even display a simple plot on windows NT4 or linux. On windows I use the enthought edition python-2.3.3-1057 and on linux I was using the latest (python 2.3.4, wxPython 2.5.2.7, numarray 1.0, Numeric 23.3...). Here is the output on linux when I try to use the simple_plot.py : ****************************************************************** Extra content at the end of the document Could not load filename for text /users/m024234/local/share/matplotlib/Vera.ttf Traceback (most recent call last): File "/usr/local/lib/python2.3/site-packages/matplotlib/ba ckends/backend_gtkagg.py", line 85, in callback else: self.draw() File "/usr/local/lib/python2.3/site-packages/matplotlib/ba ckends/backend_gtkagg.py", line 40, in draw FigureCanvasAgg.draw(self) File "/usr/local/lib/python2.3/site-packages/matplotlib/ba ckends/backend_agg.py", line 307, in draw self.figure.draw(self.renderer) File "/usr/local/lib/python2.3/site-packages/matplotlib/figure.py", line 238, in draw for a in self.axes: a.draw(renderer) File "/usr/local/lib/python2.3/site-packages/matplotlib/axes.py", line 692, in draw self.xaxis.draw(renderer) File "/usr/local/lib/python2.3/site-packages/matplotlib/ax is.py", line 475, in draw tick.draw(renderer) File "/usr/local/lib/python2.3/site-packages/matplotlib/axis.py", line 136, in draw if self.label1On: self.label1.draw(renderer) File "/usr/local/lib/python2.3/site-packages/matplotlib/text.py", line 207, in draw bbox, info = self._get_layout(renderer) File "/usr/local/lib/python2.3/site-packages/matplotlib/text.py", line 106, in _get_layout w,h = renderer.get_text_width_height( File "/usr/local/lib/python2.3/site-packages/matplotlib/backends/backend_agg .py", line 211, in get_text_width_height font.set_text(s, 0.0) # the width and height of unrotated string AttributeError: 'NoneType' object has no attribute 'set_text' ****************************************************************** Let me know if I can do anything to help you understand the problem... Anyway, great software ! Regards, |
From: Alan G I. <ai...@am...> - 2004-09-07 01:02:03
|
On Mon, 6 Sep 2004, Jean Pierre apparently wrote: > I've decided to switch to 0.62.4 ... > But it seems that everything was broken ! I cannot even display a > simple plot on windows NT4 or linux. > On windows I use the enthought edition python-2.3.3-1057 and on linux I > was using the latest (python 2.3.4, wxPython 2.5.2.7, numarray 1.0, > Numeric 23.3...). > Here is the output on linux when I try to use the simple_plot.py : > ****************************************************************** > Extra content at the end of the document > Could not load filename for text > /users/m024234/local/share/matplotlib/Vera.ttf i. It looks like a missing font? ii. Another possibility: http://matplotlib.sourceforge.net/faq.html#FREEZE hth, Alan Isaac |
From: John H. <jdh...@ac...> - 2004-09-07 02:28:34
|
>>>>> "Jean" == Jean Pierre <2s...@ma...> writes: Jean> Hello, I'm a new user of matplotlib and I have to admit that Jean> I'm quite impressed and excited about it ! I'm currently Jean> trying to convince the whole company to switch from matlab Jean> to python (at least 200 users I think), and matplotlib is a Jean> big asset. Good luck - is yours a software company? 200 new developers would be a big help :-) Jean> Extra content at the end of the document Could not load Jean> filename for text Jean> /users/m024234/local/share/matplotlib/Vera.ttf Traceback Here is your problem. The font is not being loaded. First, in matplotlib/backends/backend_agg.py on or around line 240, replace the block if font is None: fname = fontManager.findfont(prop) try: font = FT2Font(str(fname)) except RuntimeError, msg: print >> sys.stderr, 'Could not load filename for text', \ fname return None else: _fontd[key] = font with if font is None: fname = fontManager.findfont(prop) font = FT2Font(str(fname)) _fontd[key] = font in other words, don't catch the exception. This may give you extra information about what is going wrong. I notice from your path above that you have installed matplotlib in a nonstandard location. Have you set the MATPLOTLIB environment variable, as described in the installing documentation on the web page http://matplotlib.sf.net/installing.html? Do you get the same traceback on win32? Gladly-accepting-donationsly-yours, JDH |
From: Jean P. <2s...@ma...> - 2004-09-08 00:05:40
|
> Jean> Hello, I'm a new user of matplotlib and I have to admit that > Jean> I'm quite impressed and excited about it ! I'm currently > Jean> trying to convince the whole company to switch from matlab > Jean> to python (at least 200 users I think), and matplotlib is a > Jean> big asset. > > Good luck - is yours a software company? 200 new developers would be > a big help :-) No, we mainly use matlab for our own studies. But you can be sure that I will report any bugs that we found. > > Jean> Extra content at the end of the document Could not load > Jean> filename for text > Jean> /users/m024234/local/share/matplotlib/Vera.ttf Traceback > > Here is your problem. The font is not being loaded. First, in Ah ! *slap forehead* I found a ".ttffont.cache." in my home directory which was the remnants of a previous installation. Inside was the old path to the font directory. I deleted this file, and a new one with the good path was created and everything run smoothly now. > I notice from your path above that you have installed matplotlib in a > nonstandard location. Have you set the MATPLOTLIB environment > variable, as described in the installing documentation on the web page > http://matplotlib.sf.net/installing.html? ??? I never set the matplotlib environment and so far everything works fine (even if I always use non standard location !)... > Do you get the same traceback on win32? No the problem was entirely different. I was using the enthought python 2.3.3 with the IDE SPE 0.5.1d, and when under SPE I tried to run a program as simple as : from matplotlib.matlab import * subplot(2,3,5) show() A screen with weird color appeared, and everything froze. Now If I tried to run the same program directly from command-line (say from a DOS window), everything works fine. Is there some problem with SPE ? It's strange because it was ok with the 0.60.2 version of matplotlib Let me know if I can do anything to further investigate the problem... > Gladly-accepting-donationsly-yours, > JDH I really really hope to convince them to give you something (not yet thought, I still have to convince them to switch to python/matplotlib). At least to show you that someone outside appreciate the software and that it's worth continuing the project... Thanks for your help ! Regards, |