[Matplotlib-users] segfault with Tkagg
Hi, I've made a local installation of python2.5, numpy 1.0.4 and matplotlib 0.91.2. I didn't see any pb during compilation, but when I try to show a figure, I received SIGSEGV. You will find attached to this mail the log of my installation, and a backtrace of a segfault in gdb, I don't know if this helps. Have you got any glue ? -- LB [EMAIL PROTECTED]:~/tmp/Linux$ gdb python2.5 GNU gdb 6.7.1-debian Copyright (C) 2007 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as i486-linux-gnu... Using host libthread_db library /lib/i686/cmov/libthread_db.so.1. (gdb) run Starting program: /home/loic/tmp/Linux/bin/python2.5 [Thread debugging using libthread_db enabled] Python 2.5.2 (r252:60911, Feb 25 2008, 08:15:40) [GCC 4.1.2] on linux2 Type help, copyright, credits or license for more information. [New Thread 0xb7cafad0 (LWP 15665)] from pylab import * x = linspace(-10, 10,205) y = sinc(x) plot(x, y) [matplotlib.lines.Line2D instance at 0x885528c] show() Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb7cafad0 (LWP 15665)] 0xb6c87cee in PyAggImagePhoto (clientdata=0x0, interp=0x87d9c78, argc=5, argv=0xbff53ddc) at src/_transforms.h:362 362 Point* ll_api() {return _ll;} Current language: auto; currently c++ (gdb) bt #0 0xb6c87cee in PyAggImagePhoto (clientdata=0x0, interp=0x87d9c78, argc=5, argv=0xbff53ddc) at src/_transforms.h:362 #1 0xb6af52dc in TclInvokeStringCommand () from /home/loic/tmp/Linux/lib/libtcl8.4.so #2 0xb6af6e13 in TclEvalObjvInternal () from /home/loic/tmp/Linux/lib/libtcl8.4.so #3 0xb6af7d3c in Tcl_EvalObjv () from /home/loic/tmp/Linux/lib/libtcl8.4.so #4 0xb6d6b509 in Tkapp_Call (selfptr=0x884a138, args=0x880714c) at /home/loic/tmp/Linux/src/Python-2.5.2/Modules/_tkinter.c:1327 #5 0xb7ebb37d in PyCFunction_Call (func=0x88556ac, arg=0x880714c, kw=0x0) at Objects/methodobject.c:108 #6 0xb7f07ed0 in PyEval_EvalFrameEx (f=0x89baf54, throwflag=0) at Python/ceval.c:3573 #7 0xb7f097c0 in PyEval_EvalCodeEx (co=0x87b43c8, globals=0x881a13c, locals=0x0, args=0x89892fc, argcount=2, kws=0x8989304, kwcount=1, defs=0x850d5b8, defcount=2, closure=0x0) at Python/ceval.c:2836 #8 0xb7f07987 in PyEval_EvalFrameEx (f=0x89891bc, throwflag=0) at Python/ceval.c:3669 #9 0xb7f097c0 in PyEval_EvalCodeEx (co=0x8744260, globals=0x87931c4, locals=0x0, args=0x8988a68, argcount=1, kws=0x8988a6c, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2836 #10 0xb7f07987 in PyEval_EvalFrameEx (f=0x8988914, throwflag=0) at Python/ceval.c:3669 #11 0xb7f097c0 in PyEval_EvalCodeEx (co=0x8744218, globals=0x87931c4, locals=0x0, args=0x8508db8, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2836 #12 0xb7ea7300 in function_call (func=0x8843e64, arg=0x8508dac, kw=0x0) at Objects/funcobject.c:517 #13 0xb7e857b7 in PyObject_Call (func=0x0, arg=0x8508dac, kw=0x0) at Objects/abstract.c:1861 #14 0xb7f06513 in PyEval_EvalFrameEx (f=0x8987fe4, throwflag=0) at Python/ceval.c:3853 #15 0xb7f097c0 in PyEval_EvalCodeEx (co=0x87ab458, globals=0x8793c64, locals=0x0, args=0x881f240, argcount=20, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2836 #16 0xb7ea7300 in function_call (func=0x88114fc, arg=0x881f234, kw=0x0) at Objects/funcobject.c:517 #17 0xb7e857b7 in PyObject_Call (func=0x0, arg=0x881f234, kw=0x0) at Objects/abstract.c:1861 #18 0xb7e8cfd2 in instancemethod_call (func=0x8331aa4, arg=0x881f234, kw=0x0) at Objects/classobject.c:2519 #19 0xb7e857b7 in PyObject_Call (func=0x0, arg=0x871da54, kw=0x0) at Objects/abstract.c:1861 #20 0xb7f0177b in PyEval_CallObjectWithKeywords (func=0x8331aa4, arg=0x871da54, kw=0x0) at Python/ceval.c:3442 #21 0xb6d6a0af in PythonCmd (clientData=0x890, interp=0x87d9c78, argc=20, argv=0x8987520) at /home/loic/tmp/Linux/src/Python-2.5.2/Modules/_tkinter.c:2014 #22 0xb6af52dc in TclInvokeStringCommand () from /home/loic/tmp/Linux/lib/libtcl8.4.so #23 0xb6af6e13 in TclEvalObjvInternal () from /home/loic/tmp/Linux/lib/libtcl8.4.so #24 0xb6b22bb7 in TclExecuteByteCode () from /home/loic/tmp/Linux/lib/libtcl8.4.so #25 0xb6b1fd54 in Tcl_ExprObj () from /home/loic/tmp/Linux/lib/libtcl8.4.so #26 0xb6af6633 in Tcl_ExprBooleanObj () from /home/loic/tmp/Linux/lib/libtcl8.4.so #27 0xb6b04085 in Tcl_IfObjCmd () from /home/loic/tmp/Linux/lib/libtcl8.4.so #28 0xb6af6e13 in TclEvalObjvInternal () from /home/loic/tmp/Linux/lib/libtcl8.4.so #29 0xb6af73ad in Tcl_EvalEx () from /home/loic/tmp/Linux/lib/libtcl8.4.so #30 0xb6b9eeba in Tk_BindEvent () from /home/loic/tmp/Linux/lib/libtk8.4.so #31 0xb6ba4773 in TkBindEventProc () from /home/loic/tmp/Linux/lib/libtk8.4.so #32 0xb6baa39a in Tk_HandleEvent () from
[Matplotlib-users] Pb with setupext.py - nonstandard installation of python and tk
Hi, I've got difficulties to make a local installation of matplotlib. I think it's due to my nonstandard installation of python and tk, which both are in my home. I've seen on the website that , for non standard installation, I should complete the basedir dictionary defined in the setupext.py script. But for the Tcl/Tk header files, this does not seems to work. Whatever I put in this dictionary, the module.include_dirs corresponding to Tk (line 825 of setupext.py) is always equal to ['/usr/share/include', '/usr/share/include']. Did I miss something obvious ? I'm on a linux2 platform and I''m trying make a local installation of python2.5 + matplotlib 0.91.2 in my home. Regards, -- LB - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. 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
[Matplotlib-users] Moving text objects with drag n drop
hi, I've put online an example, which uses drag n drop to move text objects. Comments and critics will be really appreciated. You can find this here : http://www.scipy.org/Cookbook/Matplotlib/Drag_n_Drop_Text_Example Regards, -- BL - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. 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
[Matplotlib-users] Positioning annotations
Hi, I would like to annotate a bunch of points on a map. I'm trying to use the annotate function, but it need to know the text coordinates. So you have to configure manually in order not to have these annotations overlap each other. This is really annoying. Is there a way to : - detect the best position for theses annotation as with loc=best argument of the legend function ? - let me move theses annotations with the mouse ? I've heard that matplotlib gives the possibility of using events and signals. Can this be used in this situation ? Is there any example for this ? Regards, -- BL - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. 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
[Matplotlib-users] Using non ascii characters
Hi, I would like to use non ascii characters in title and label but with my current intallation it does not work properly. There's no warning or error messages when I set a title with some non ascii characters (I use iso-88599-1 characters, like é or à), but I get a empty square instead of theses characters in the figure. I'm using matplotlib-0.90.1. Is there anything to configure to handle non ascii characters ? Regards, -- BL - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. 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
Re: [Matplotlib-users] Using non ascii characters
I'm using a basic Debian Etch distribution. I've attached a very simple file showing the problem. On my computer, neither the title, nor the legend are displayed correctly, and I've got square instead of each non ascii characters. The attached script gives me the following informations : matplotlib : 0.90.1 backend: TkAgg encoding : UTF-8 I will try to install a SVN version of matplotlib and see if this works better. #! /usr/bin/python # -*-coding: utf-8-*- from numpy import arange import pylab as p import matplotlib import sys print matplotlib : , matplotlib.__version__ print backend: , matplotlib.get_backend() print encoding : , sys.getfilesystemencoding() x = arange(10) y = x**2-x+4 p.plot(x, y, 'ro-', label=r'polynôme') p.title(r'à é ï ù') p.xlabel('x') p.legend() p.show() - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. 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
[Matplotlib-users] multiline math text
- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. 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
[Matplotlib-users] Weibull plot
Hi, I need to make some Weibull analysis and I wanted to make it with numpy and scipy. Theses analysis are based on Weibull plots : - on X, time values are reported according to a log scale - on Y, probability (F) is reported according to a special scale, which lets Weibull random variables fit on a line. So the pair (t, F) should be plotted on ( ln(t), ln( -ln(1-F)) ) You can find an example of weibull plot here : http://www.itl.nist.gov/div898/handbook/eda/section3/weibplot.htm Here is my way to make weibull plot with matplotlib : [code] from numpy import * from matplotlib.ticker import FuncFormatter import pylab as p # I'm used to the ln notation for the natural log from numpy import log as ln # Paramters beta = 5.2 eta = 12 # Genrate 10 numbers following a Weibull distribution x = eta *random.weibull(beta, size=10) F = 1 - exp( -(x/eta)**beta ) # Estimate Weibull parameters lnX = ln(x) lnF = ln( -ln(1-F) ) a, b = polyfit(lnF, lnX, 1) beta0 = 1/a eta0 = exp(b) # ideal line F0 = array([1e-3, 1-1e-3]) x0 = eta0 * (-ln(1-F0))**(1/beta0) lnF0 = ln(-ln(1-F0)) # Weibull plot p.figure() ax = p.subplot(111) p.semilogx(x, lnF, bs) p.plot(x0, lnF0, 'r-', label=beta= %5G\neta = %.5G % (beta0, eta0) ) p.grid() p.xlabel('x') p.ylabel('Cumulative Distribution Function') p.legend(loc='lower right') # ticks def weibull_CDF(y, pos): return %G %% % (100*(1-exp(-exp(y formatter = FuncFormatter(weibull_CDF) ax.yaxis.set_major_formatter(formatter) yt_F = array([ 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 0.99]) yt_lnF = ln( -ln(1-yt_F)) p.yticks(yt_lnF) p.show() [/code] This works, but I 'm pretty sure this could be improved : 1) Is there a way to use matplotlib.transforms to handle the convertion between F and y=ln(-ln(1-F)) ? 2) I would like to have vertical lines for major and minor ticks. How can I do that ? 3) In this case, the log notation for the X axis is not pertinent. How could I switch to a more common floating point notation ? Any hints ? Thanks -- LB - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users