[Matplotlib-users] Matplotlib interactive application

2011-08-08 Thread German Ocampo
Good afternoon Experts:

Do you know if there is an py application where I can build a
matplotlib  plot interactively for data series, and then when it
finished, the source code could be exported to be used in a python
application?


Many thanks for your help,

German

--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] segfault in matplotlib

2011-08-08 Thread Michael Droettboom
This is a shot in the dark, but I've seen this before when matplotlib 
didn't get fully rebuilt after a numpy upgrade.

Mike

On 08/04/2011 01:13 PM, Alexey Uimanov wrote:
> here is the sample code "embedding_in_gtk2.py"
>
>   6 import gtk
>   7
>   8 from matplotlib.figure import Figure
>   9 from numpy import arange, sin, pi
> 10
> 11 # uncomment to select /GTK/GTKAgg/GTKCairo
> 12 #from matplotlib.backends.backend_gtk import FigureCanvasGTK as 
> FigureCanvas
> 13 from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg
> as FigureCanvas
> 14 #from matplotlib.backends.backend_gtkcairo import
> FigureCanvasGTKCairo as FigureCanvas
> 15
> 16 # or NavigationToolbar for classic
> 17 #from matplotlib.backends.backend_gtk import NavigationToolbar2GTK
> as NavigationToolbar
> 18 from matplotlib.backends.backend_gtkagg import
> NavigationToolbar2GTKAgg as NavigationToolbar
> 19
> 20
> 21 win = gtk.Window()
> 22 win.connect("destroy", lambda x: gtk.main_quit())
> 23 win.set_default_size(400,300)
> 24 win.set_title("Embedding in GTK")
> 25
> 26 vbox = gtk.VBox()
> 27 win.add(vbox)
> 28
> 29 fig = Figure(figsize=(5,4), dpi=100)
> 30 import pudb
> 31 pudb.set_trace()
> 32 ax = fig.add_subplot(111)
> 33 t = arange(0.0,3.0,0.01)
> 34 s = sin(2*pi*t)
> 35
> 36 ax.plot(t,s)
> 37
> 38
> 39 canvas = FigureCanvas(fig)  # a gtk.DrawingArea
> 40 vbox.pack_start(canvas)
> 41 toolbar = NavigationToolbar(canvas, win)
> 42 vbox.pack_start(toolbar, False, False)
> 43
> 44
> 45 win.show_all()
> 46 gtk.main()
>
> on line 36 error segfault.
> Here is the gdb session
>
> Starting program: /usr/bin/python2.7 embedding_in_gtk2.py
> [Thread debugging using libthread_db enabled]
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x7fffeda71594 in __cxa_allocate_exception () from
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/libstdc++.so.6
> #0  0x7fffeda71594 in __cxa_allocate_exception () from
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/libstdc++.so.6
> #1  0x7fffe4830164 in py_to_agg_transformation_matrix(_object*, bool) ()
> from /usr/lib64/python2.7/site-packages/matplotlib/_path.so
> #2  0x7fffe483addb in _path_module::update_path_extents(Py::Tuple const&) 
> ()
> from /usr/lib64/python2.7/site-packages/matplotlib/_path.so
> #3  0x7fffe4841ad8 in
> Py::ExtensionModule<_path_module>::invoke_method_varargs(void*,
> Py::Tuple const&) ()
> from /usr/lib64/python2.7/site-packages/matplotlib/_path.so
> #4  0x7fffe482b54d in method_varargs_call_handler () from
> /usr/lib64/python2.7/site-packages/matplotlib/_path.so
> #5  0x77b09a7b in PyEval_EvalFrameEx () from
> /usr/lib64/libpython2.7.so.1.0
> #6  0x77b0b658 in PyEval_EvalCodeEx () from
> /usr/lib64/libpython2.7.so.1.0
> #7  0x77b09bc7 in PyEval_EvalFrameEx () from
> /usr/lib64/libpython2.7.so.1.0
> #8  0x77b0b658 in PyEval_EvalCodeEx () from
> /usr/lib64/libpython2.7.so.1.0
> #9  0x77b09bc7 in PyEval_EvalFrameEx () from
> /usr/lib64/libpython2.7.so.1.0
> #10 0x77b0b658 in PyEval_EvalCodeEx () from
> /usr/lib64/libpython2.7.so.1.0
> #11 0x77b09bc7 in PyEval_EvalFrameEx () from
> /usr/lib64/libpython2.7.so.1.0
> #12 0x77b0b658 in PyEval_EvalCodeEx () from
> /usr/lib64/libpython2.7.so.1.0
> #13 0x77b09bc7 in PyEval_EvalFrameEx () from
> /usr/lib64/libpython2.7.so.1.0
> #14 0x77b0b658 in PyEval_EvalCodeEx () from
> /usr/lib64/libpython2.7.so.1.0
> #15 0x77b0b762 in PyEval_EvalCode () from 
> /usr/lib64/libpython2.7.so.1.0
> #16 0x77b2545c in ?? () from /usr/lib64/libpython2.7.so.1.0
> #17 0x77b25530 in PyRun_FileExFlags () from
> /usr/lib64/libpython2.7.so.1.0
> #18 0x77b26a1f in PyRun_SimpleFileExFlags () from
> /usr/lib64/libpython2.7.so.1.0
> #19 0x77b377cc in Py_Main () from /usr/lib64/libpython2.7.so.1.0
> #20 0x774d4bad in __libc_start_main () from /lib64/libc.so.6
> #21 0x004008c9 in _start ()
>
> I have python 2.7.1 and amd64 linux distributive (gentoo). I did not
> see this problem on x86 linux.
> Thanks.
>
> --
> BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
> The must-attend event for mobile developers. Connect with experts.
> Get tools for creating Super Apps. See the latest technologies.
> Sessions, hands-on labs, demos&  much more. Register early&  save!
> http://p.sf.net/sfu/rim-blackberry-1
> ___
> Matplotlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-- 
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA


--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating S

[Matplotlib-users] Having trouble installing matplotlib on Mac OS X Lion

2011-08-08 Thread Bill Carithers
Hi all,

I had matplotlib-0.99.1.1 working with Python 2.6 on OS X v10.6(Snow
Leopard). Today I upgraded to Lion (v10.7) and matplotlib had disappeared.
Lion ships with Apple¹s version of Python 2.7. Even when I look back at
Python 2.6 in the /System/Library/Frameworks/Python/Version/Python2.6, it
seems to be gone. OK, I thought I would install matplotlib-1.0.1 in Python
2.7 using easy_install. It failed when unable to find the headers for numpy
(terminal output below). Lion comes with numpy 1.5.1 pre-installed. I tried
re-installing numpy but that didn¹t help so now I¹m stuck.

Any suggestions?

Thanks.


c4-2c-3-1-f0-3a:matplotlib-1.0.1 williamcarithers$ sudo easy_install
matplotlib
Searching for matplotlib
Reading http://pypi.python.org/simple/matplotlib/
Reading http://matplotlib.sourceforge.net
Reading 
https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0.
1/
Reading 
http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474
Reading http://sourceforge.net/project/showfiles.php?group_id=80706
Reading 
https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=8247
4
Reading 
https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99
.1/
Reading 
https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=2781
94
Reading 
https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99
.3/
Reading 
https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0
Best match: matplotlib 1.0.1
Downloading 
http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0.1
/matplotlib-1.0.1.tar.gz/download
Processing matplotlib-1.0.1.tar.gz
Running matplotlib-1.0.1/setup.py -q bdist_egg --dist-dir
/tmp/easy_install-OI8zuY/matplotlib-1.0.1/egg-dist-tmp-3EXRXm
basedirlist is: []

BUILDING MATPLOTLIB
matplotlib: 1.0.1
python: 2.7.1 (r271:86832, Jun 16 2011, 16:59:05)  [GCC
4.2.1 (Based on Apple Inc. build 5658) (LLVM build
2335.15.00)]
  platform: darwin

REQUIRED DEPENDENCIES
 numpy: 1.5.1
* Could not find the headers for numpy.  You may
* need to install the development package.
error: Setup script exited with 1
--
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users