Re: [Matplotlib-users] CVS ?
Wayne, I'm stumped. Do you get a segfault only with the gui backend? Can you you do this: import matplotlib matplotlib.use('Agg') import pylab pylab.plot([1,2,3]) pylab.savefig('test.png') Eric Wayne E. Harlan wrote: > Eric Firing wrote: >> If a straightforward plotting sequence, such as one of the examples, >> does this, then it sounds like a broken installation, not a matplotlib >> bug. >> > Based on your comment above, here are my particulars: > > 1) System is LinuxFromScratch recently built from their SVN book: >glibc is 2.5, gcc is 4.1.2, X is Xorg 7.2 installed in /usr. > > 2) Python 2.5.1 with Tkinter enabled. If I run the following script, > I get the 'quit' button which when clicked makes the button/window > disappear, so I know python and Tkinter are working. > > #!/usr/bin/python > from Tkinter import * > class Application(Frame): >def __init__(self, master=None): >Frame.__init__(self, master) >self.grid() >self.createWidgets() >def createWidgets(self): >self.quitButton = Button ( self, text="Quit",command=self.quit ) >self.quitButton.grid() > app = Application() > app.master.title("Sample application") > app.mainloop() > > 3) Numpy 1.0.3.1 installed without any errors and I can do the following: > > >>> import numpy > >>> List = dir(numpy) > >>> len(List) > 491 > >>> > > 4) Matplotlib 0.90.1 also installed without error. I set > BUILD_TKAGG = 1 which may not have been necessary, but it seems to > have worked since in my matplotlibrc file I find "backend : > TkAgg". Then if I do this > " python simple_plot.py --verbose-debug", I get the output in the > simple_output attachment. The font errors there are the same as what I > get in each of my 3 XP installations where matplotlib works just fine, > so I don't think they are the cause of the segfault. As I may have > described previously, the plot window appears for a fraction of a second > and then disappears as the segfault occurs. > > I also ran "strace python simple_plot.py --verbose-debug" with the > output that's in the strace_output attachment to see if that would give > any more information but that output ends at the segfault and I am not > knowledgeable enough to understand what it says. > > Any help will be appreciated. > > Best Regards, > > Wayne > > > > > [EMAIL PROTECTED] ~/Programming/Python/matplotlib/examples: python > simple_plot.py --verbose-debug > matplotlib data path /usr/lib/python2.5/site-packages/matplotlib/mpl-data > $HOME=/home/wayne > CONFIGDIR=/home/wayne/.matplotlib > loaded rc file /home/wayne/.matplotlib/matplotlibrc > matplotlib version 0.90.1 > verbose.level debug > interactive is False > units is True > platform is linux2 > loaded modules: ['pylab', 'distutils.distutils', '_bisect', '__future__', > 'copy_reg', > 'sre_compile', 'distutils', 'itertools', '_hashlib', '_sre', '__main__', > 'site', '__ > builtin__', 'datetime', 'matplotlib.re', 'matplotlib.tempfile', 'encodings', > 'encodin > gs.encodings', 'shutil', 'distutils.string', 'dateutil', > 'matplotlib.datetime', 'posi > xpath', '_random', 'tempfile', 'errno', 'matplotlib.warnings', 'binascii', > 'encodings > .codecs', 'sre_constants', 're', 'matplotlib.md5', 'os.path', 'pytz.sys', > '_codecs', > 'distutils.sysconfig', 'pytz.sets', 'math', 'fcntl', 'stat', 'zipimport', > 'string', ' > warnings', 'encodings.types', 'UserDict', 'encodings.ascii', > 'matplotlib.sys', 'matpl > otlib', 'distutils.os', 'sys', 'pytz.tzinfo', 'pytz', 'pytz.datetime', > 'matplotlib.__ > future__', 'codecs', 'distutils.re', 'matplotlib.pytz', 'types', 'md5', > '_types', 'ma > tplotlib.dateutil', 'hashlib', 'matplotlib.os', 'thread', 'bisect', > 'matplotlib.distu > tils', 'signal', 'distutils.errors', 'random', 'linecache', > 'matplotlib.shutil', 'pos > ix', 'encodings.aliases', 'sets', 'exceptions', 'sre_parse', 'pytz.bisect', > 'distutil > s.sys', 'os', 'strop'] > numerix numpy 1.0.3.1 > font search path > ['/usr/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf', ' > /usr/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/afm'] > trying fontname > /usr/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/VeraMo > BI.ttf > trying fontname > /usr/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/VeraSe > .ttf > trying fontname > /usr/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/cmmi10 > .ttf > trying fontname > /usr/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/VeraSe > Bd.ttf > trying fontname > /usr/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/cmsy10 > .ttf > trying fontname > /usr/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/VeraIt > .ttf > trying fontname > /usr/lib/python2.5/site-packages/matplotlib/mpl-data/fonts/ttf/cmr10. > ttf > trying fontname > /usr/lib/python2.5/site-packages/matplotlib
Re: [Matplotlib-users] CVS ?
I'll second Eric's suggestion. It might also help to have a backtrace from gdb in addition to your strace output. Cheers, Mike Wayne E. Harlan wrote: > Eric Firing wrote: >> If a straightforward plotting sequence, such as one of the examples, >> does this, then it sounds like a broken installation, not a matplotlib >> bug. >> > Based on your comment above, here are my particulars: > > 1) System is LinuxFromScratch recently built from their SVN book: >glibc is 2.5, gcc is 4.1.2, X is Xorg 7.2 installed in /usr. > > 2) Python 2.5.1 with Tkinter enabled. If I run the following script, > I get the 'quit' button which when clicked makes the button/window > disappear, so I know python and Tkinter are working. > > #!/usr/bin/python > from Tkinter import * > class Application(Frame): >def __init__(self, master=None): >Frame.__init__(self, master) >self.grid() >self.createWidgets() >def createWidgets(self): >self.quitButton = Button ( self, text="Quit",command=self.quit ) >self.quitButton.grid() > app = Application() > app.master.title("Sample application") > app.mainloop() > > 3) Numpy 1.0.3.1 installed without any errors and I can do the following: > > >>> import numpy > >>> List = dir(numpy) > >>> len(List) > 491 > >>> > > 4) Matplotlib 0.90.1 also installed without error. I set > BUILD_TKAGG = 1 which may not have been necessary, but it seems to > have worked since in my matplotlibrc file I find "backend : > TkAgg". Then if I do this > " python simple_plot.py --verbose-debug", I get the output in the > simple_output attachment. The font errors there are the same as what I > get in each of my 3 XP installations where matplotlib works just fine, > so I don't think they are the cause of the segfault. As I may have > described previously, the plot window appears for a fraction of a second > and then disappears as the segfault occurs. > > I also ran "strace python simple_plot.py --verbose-debug" with the > output that's in the strace_output attachment to see if that would give > any more information but that output ends at the segfault and I am not > knowledgeable enough to understand what it says. > > Any help will be appreciated. > > Best Regards, > > Wayne > > > > > - > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ > > > > > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] CVS ?
Eric Firing wrote: Wayne, I'm stumped. Do you get a segfault only with the gui backend? Can you you do this: import matplotlib matplotlib.use('Agg') import pylab pylab.plot([1,2,3]) pylab.savefig('test.png') Eric OK, this worked. I have attached the test,png file that resulted. But I don't quite know what this means ... IDLE 1.2.1 >>> import matplotlib >>> matplotlib.use('Agg') >>> import pylab >>> pylab.plot([1,2,3]) [] >>> pylab.savefig('test.png') >>> The other suggestion from Michael about using gdb will have to wait until I download, install and learn to use it, but if that's required, that's what I'll do. Thanks Wayne <>- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] CVS ?
Wayne, Segfaults are generally caused by problems in extension code or libraries. The fact that the plotting works with a non-gui backend indicates that the problem is not in matplotlib's transform or Agg extension code, or in the bits of numpy code that get used along the way. I was pretty sure this would be the case; all of those components are solid and well-tested together, at least for simple plotting. That tends to throw suspicion on Tkinter/Tk/Tcl or one of mpl's extension bits that is run with Tk. I'm not sure there are any in this case. One way to narrow it down is to try another gui: gtk or qt. Do you have either of these libraries installed? Eric Wayne E. Harlan wrote: > > > Eric Firing wrote: >> Wayne, >> >> I'm stumped. Do you get a segfault only with the gui backend? Can >> you you do this: >> >> import matplotlib >> matplotlib.use('Agg') >> import pylab >> pylab.plot([1,2,3]) >> pylab.savefig('test.png') >> >> Eric > > > OK, this worked. I have attached the test,png file that resulted. But > I don't quite know what this means ... > > IDLE 1.2.1 >>> import matplotlib > >>> matplotlib.use('Agg') > >>> import pylab > >>> pylab.plot([1,2,3]) > [] > >>> pylab.savefig('test.png') > >>> > > The other suggestion from Michael about using gdb will have to wait > until I download, install and learn to use it, but if that's required, > that's what I'll do. > > Thanks > > Wayne > > > > - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] CVS ?
Eric: First thanks for all the help. Here's the scoop after I replied to your earlier post. I thought a bit about the sense of where you were going (it always helps to think a bit). So I decided to try compiling matplotlib with the GTK backend instead of Tk. I have gtk-2.11.5. So I did some sed's to the setup.py file: sed -i "s|BUILD_GTKAGG = 'auto'|BUILD_GTKAGG = 1|" setup.py && sed -i "s|BUILD_GTK = 'auto'|BUILD_GTK = 1|" setup.py && sed -i "s|BUILD_TKAGG= 'auto'|BUILD_TKAGG = 0|" setup.py && and then proceeded. It turned out that I needed pygtk, so I downloaded that and installed it, but pygtk still complained about not having pycairo (which it says is optional), so I downloaded that. Making a long story short, installing pycairo-1.4.0, pyobject-2.14.0, pygtk-2.10.6 and then reinstalling matplotlib with the above sed's did the trick. I'm displaying all the plots I have been able to in XP (so I don't need XP any more, at least at home). Once again, thanks for the suggestions. Although I'm set here, I wonder about the tcl/tk issue with matplotlib. I am using tcl/tk-8.4.15. I wonder if it's too new ? Or is there some other package that is needed ? Wayne Eric Firing wrote: > Wayne, > > Segfaults are generally caused by problems in extension code or > libraries. The fact that the plotting works with a non-gui backend > indicates that the problem is not in matplotlib's transform or Agg > extension code, or in the bits of numpy code that get used along the > way. I was pretty sure this would be the case; all of those > components are solid and well-tested together, at least for simple > plotting. > > That tends to throw suspicion on Tkinter/Tk/Tcl or one of mpl's > extension bits that is run with Tk. I'm not sure there are any in > this case. > > One way to narrow it down is to try another gui: gtk or qt. Do you > have either of these libraries installed? > > Eric > > Wayne E. Harlan wrote: >> >> >> Eric Firing wrote: >>> Wayne, >>> >>> I'm stumped. Do you get a segfault only with the gui backend? Can >>> you you do this: >>> >>> import matplotlib >>> matplotlib.use('Agg') >>> import pylab >>> pylab.plot([1,2,3]) >>> pylab.savefig('test.png') >>> >>> Eric >> >> >> OK, this worked. I have attached the test,png file that resulted. >> But I don't quite know what this means ... >> >> IDLE 1.2.1 >>> import matplotlib >> >>> matplotlib.use('Agg') >> >>> import pylab >> >>> pylab.plot([1,2,3]) >> [] >> >>> pylab.savefig('test.png') >> >>> >> >> The other suggestion from Michael about using gdb will have to wait >> until I download, install and learn to use it, but if that's >> required, that's what I'll do. >> >> Thanks >> >> Wayne >> >> >> >> > > - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users