Re: [Matplotlib-users] Event handling, API programming

2008-10-29 Thread Anthony Floyd
Hi Adam,

On Sun, Oct 26, 2008 at 4:34 PM, Adam <[EMAIL PROTECTED]> wrote:
> Hi, I'm trying to make myself a set of widgets for the first time.
>  I've gotten to the point that I can draw rectangles and lines and make
>  them do the right things when re-drawing figures, zooming, etc., but
>  I'm still a little lost on some points, and I haven't found any really
>  good documentation.
>
>
> So, first question: Where should I go for documentation first?

As you've probably noticed, the documentation is in the middle of an
update.  Part of what has suffered while the docs are updated is the
API documentation.  The source code, however, is quite well
documented.  A good way to get access to this documentation is to get
a hold of epydoc and run it on the matplotlib source tree.  This will
generate good local docs for you.

Cheers,
A>

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Masking with patches

2008-10-29 Thread Søren Nielsen
Hi,

I'm making a masking function that can mask out certain areas of an image
using different types of masks, and display them using patches. I want to
add a function where a user can move a mask that has already been created.

I can use the picker = True to have it return the patch being clicked on..
but how do I know which mask was clicked on if I have two identical masks?
or even worse, if I have two identical masks almost lying ontop of each
other.. returning both patches at the same time?? I've tried different
things using == to compare.. but that didn't work.. any suggestions??

Soren
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] trouble with installation from svn

2008-10-29 Thread Michael Droettboom
Sorry. That's my bad. This is hopefully now fixed. Try updating to SVN 
r6351.

Mike

Nils Wagner wrote:
>   
> Hi all,
>
> I cannot install matplotlib from recent svn.
> Here is the output
>
>
> building 'matplotlib.backends._wxagg' extension
> gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 
> -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -fPIC 
> -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 
> -D_LARGE_FILES -DNO_GCC_PRAGMA -I/usr/local/include 
> -I/usr/include -I. 
> -I/usr/local/lib64/python2.5/site-packages/numpy/core/include 
> -Isrc -Iagg24/include -I. 
> -I/usr/local/lib64/python2.5/site-packages/numpy/core/include 
> -I/usr/include/freetype2 -I/usr/local/include 
> -I/usr/include -I. 
> -I/usr/lib64/wx/include/gtk2-unicode-release-2.6 
> -I/usr/include/wx-2.6 -I/usr/include/python2.5 -c 
> src/_wxagg.cpp -o build/temp.linux-x86_64-2.5/src/_wxagg.o
> src/_wxagg.cpp: In function ‘wxImage* 
> convert_agg2image(RendererAgg*, Py::Object)’:
> src/_wxagg.cpp:181: error: no match for ‘operator*’ in 
> ‘*aggRenderer->RendererAgg::renderingBuffer’
> /usr/include/wx-2.6/wx/datetime.h:2065: note: candidates 
> are: wxTimeSpan operator*(int, const wxTimeSpan&)
> /usr/include/wx-2.6/wx/datetime.h:2071: note: 
> wxDateSpan operator*(int, const 
> wxDateSpan&)
> /usr/include/wx-2.6/wx/geometry.h:243: note: 
> wxPoint2DInt operator*(const 
> wxPoint2DInt&, const wxPoint2DInt&)
> /usr/include/wx-2.6/wx/geometry.h:248: note: 
> wxPoint2DInt operator*(wxInt32, const 
> wxPoint2DInt&)
> /usr/include/wx-2.6/wx/geometry.h:258: note: 
> wxPoint2DInt operator*(const 
> wxPoint2DInt&, wxInt32)
> /usr/include/wx-2.6/wx/geometry.h:253: note: 
> wxPoint2DInt operator*(wxDouble, const 
> wxPoint2DInt&)
> /usr/include/wx-2.6/wx/geometry.h:263: note: 
> wxPoint2DInt operator*(const 
> wxPoint2DInt&, wxDouble)
> /usr/include/wx-2.6/wx/geometry.h:467: note: 
> wxPoint2DDouble operator*(const 
> wxPoint2DDouble&, const wxPoint2DDouble&)
> /usr/include/wx-2.6/wx/geometry.h:472: note: 
> wxPoint2DDouble operator*(wxDouble, const 
> wxPoint2DDouble&)
> /usr/include/wx-2.6/wx/geometry.h:477: note: 
> wxPoint2DDouble operator*(wxInt32, const 
> wxPoint2DDouble&)
> /usr/include/wx-2.6/wx/geometry.h:482: note: 
> wxPoint2DDouble operator*(const 
> wxPoint2DDouble&, wxDouble)
> /usr/include/wx-2.6/wx/geometry.h:487: note: 
> wxPoint2DDouble operator*(const 
> wxPoint2DDouble&, wxInt32)
> /usr/local/lib64/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:
>  
> At global scope:
> /usr/local/lib64/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:958:
>  
> warning: ‘int _import_array()’ defined but not used
> error: command 'gcc' failed with exit status 1
>
> Nils
>
> -
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ___
> 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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] trouble with installation from svn

2008-10-29 Thread Nils Wagner
  
Hi all,

I cannot install matplotlib from recent svn.
Here is the output


building 'matplotlib.backends._wxagg' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 
-fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -fPIC 
-DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 
-D_LARGE_FILES -DNO_GCC_PRAGMA -I/usr/local/include 
-I/usr/include -I. 
-I/usr/local/lib64/python2.5/site-packages/numpy/core/include 
-Isrc -Iagg24/include -I. 
-I/usr/local/lib64/python2.5/site-packages/numpy/core/include 
-I/usr/include/freetype2 -I/usr/local/include 
-I/usr/include -I. 
-I/usr/lib64/wx/include/gtk2-unicode-release-2.6 
-I/usr/include/wx-2.6 -I/usr/include/python2.5 -c 
src/_wxagg.cpp -o build/temp.linux-x86_64-2.5/src/_wxagg.o
src/_wxagg.cpp: In function ‘wxImage* 
convert_agg2image(RendererAgg*, Py::Object)’:
src/_wxagg.cpp:181: error: no match for ‘operator*’ in 
‘*aggRenderer->RendererAgg::renderingBuffer’
/usr/include/wx-2.6/wx/datetime.h:2065: note: candidates 
are: wxTimeSpan operator*(int, const wxTimeSpan&)
/usr/include/wx-2.6/wx/datetime.h:2071: note: 
wxDateSpan operator*(int, const 
wxDateSpan&)
/usr/include/wx-2.6/wx/geometry.h:243: note: 
wxPoint2DInt operator*(const 
wxPoint2DInt&, const wxPoint2DInt&)
/usr/include/wx-2.6/wx/geometry.h:248: note: 
wxPoint2DInt operator*(wxInt32, const 
wxPoint2DInt&)
/usr/include/wx-2.6/wx/geometry.h:258: note: 
wxPoint2DInt operator*(const 
wxPoint2DInt&, wxInt32)
/usr/include/wx-2.6/wx/geometry.h:253: note: 
wxPoint2DInt operator*(wxDouble, const 
wxPoint2DInt&)
/usr/include/wx-2.6/wx/geometry.h:263: note: 
wxPoint2DInt operator*(const 
wxPoint2DInt&, wxDouble)
/usr/include/wx-2.6/wx/geometry.h:467: note: 
wxPoint2DDouble operator*(const 
wxPoint2DDouble&, const wxPoint2DDouble&)
/usr/include/wx-2.6/wx/geometry.h:472: note: 
wxPoint2DDouble operator*(wxDouble, const 
wxPoint2DDouble&)
/usr/include/wx-2.6/wx/geometry.h:477: note: 
wxPoint2DDouble operator*(wxInt32, const 
wxPoint2DDouble&)
/usr/include/wx-2.6/wx/geometry.h:482: note: 
wxPoint2DDouble operator*(const 
wxPoint2DDouble&, wxDouble)
/usr/include/wx-2.6/wx/geometry.h:487: note: 
wxPoint2DDouble operator*(const 
wxPoint2DDouble&, wxInt32)
/usr/local/lib64/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:
 
At global scope:
/usr/local/lib64/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:958:
 
warning: ‘int _import_array()’ defined but not used
error: command 'gcc' failed with exit status 1

Nils

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] [ImportError]: cannot import name AxisConcatenator from "import matplotlib"

2008-10-29 Thread Michael Droettboom
It looks like this import error is actually inside Numpy.  Try 
completely removing it and reinstalling.

Cheers,
Mike

Zhuanshi He wrote:
> Hi
>
> I just installed matplotlib-0.98.3-py2.5-win32.egg using
> "easy_inbstall -U matplotlib" on WinXP, and tried to test it under
> ipython. It looks there is an ImportError exist.
>
> Any patch is available?
>
> see my screen outpus:
> 
> Python 2.5.2 (r252:60911, Mar 27 2008, 17:57:18) [MSC v.1310 32 bit (Intel)]
> Type "copyright", "credits" or "license" for more information.
>
> IPython 0.9.1 -- An enhanced Interactive Python.
> ? -> Introduction and overview of IPython's features.
> %quickref -> Quick reference.
> help  -> Python's own help system.
> object?   -> Details about 'object'. ?object also works, ?? prints more.
>
> In [1]: import matplotlib
> ---
> ImportError   Traceback (most recent call last)
>
> C:\Python25\Scripts\ in ()
>
> c:\python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\__ini
> t__.py in ()
> 126 import sys, os, tempfile
> 127
> --> 128 from rcsetup import defaultParams, validate_backend, validate_toolbar
> 129 from rcsetup import validate_cairo_format
> 130
>
> c:\python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\rcset
> up.py in ()
>  17 import warnings
>  18 from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
> ---> 19 from matplotlib.colors import is_color_like
>  20
>  21 #interactive_bk = ['gtk', 'gtkagg', 'gtkcairo', 'fltkagg', 'qtagg', 
> 'qt4
> agg',
>
> c:\python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\color
> s.py in ()
>  37 import numpy as np
>  38 from numpy import ma
> ---> 39 import matplotlib.cbook as cbook
>  40
>  41 cnames = {
>
> c:\python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\cbook
> .py in ()
>   7 import time, datetime
>   8 import numpy as np
> > 9 import numpy.ma as ma
>  10 from weakref import ref
>  11
>
> C:\Python25\Lib\site-packages\numpy\ma\__init__.py in ()
>  15 from core import *
>  16
> ---> 17 import extras
>  18 from extras import *
>  19
>
> C:\Python25\Lib\site-packages\numpy\ma\extras.py in ()
>  39 from numpy import ndarray, array as nxarray
>  40 import numpy.core.umath as umath
> ---> 41 from numpy.lib.index_tricks import AxisConcatenator
>  42 from numpy.lib.polynomial import _lstsq, _single_eps, _double_eps
>  43
>
> ImportError: cannot import name AxisConcatenator
>
> In [2]:
>
> -
>
>   

-- 
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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] [ImportError]: cannot import name AxisConcatenator from "import matplotlib"

2008-10-29 Thread Zhuanshi He
Hi

I just installed matplotlib-0.98.3-py2.5-win32.egg using
"easy_inbstall -U matplotlib" on WinXP, and tried to test it under
ipython. It looks there is an ImportError exist.

Any patch is available?

see my screen outpus:

Python 2.5.2 (r252:60911, Mar 27 2008, 17:57:18) [MSC v.1310 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.

IPython 0.9.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help  -> Python's own help system.
object?   -> Details about 'object'. ?object also works, ?? prints more.

In [1]: import matplotlib
---
ImportError   Traceback (most recent call last)

C:\Python25\Scripts\ in ()

c:\python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\__ini
t__.py in ()
126 import sys, os, tempfile
127
--> 128 from rcsetup import defaultParams, validate_backend, validate_toolbar
129 from rcsetup import validate_cairo_format
130

c:\python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\rcset
up.py in ()
 17 import warnings
 18 from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
---> 19 from matplotlib.colors import is_color_like
 20
 21 #interactive_bk = ['gtk', 'gtkagg', 'gtkcairo', 'fltkagg', 'qtagg', 'qt4
agg',

c:\python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\color
s.py in ()
 37 import numpy as np
 38 from numpy import ma
---> 39 import matplotlib.cbook as cbook
 40
 41 cnames = {

c:\python25\lib\site-packages\matplotlib-0.98.3-py2.5-win32.egg\matplotlib\cbook
.py in ()
  7 import time, datetime
  8 import numpy as np
> 9 import numpy.ma as ma
 10 from weakref import ref
 11

C:\Python25\Lib\site-packages\numpy\ma\__init__.py in ()
 15 from core import *
 16
---> 17 import extras
 18 from extras import *
 19

C:\Python25\Lib\site-packages\numpy\ma\extras.py in ()
 39 from numpy import ndarray, array as nxarray
 40 import numpy.core.umath as umath
---> 41 from numpy.lib.index_tricks import AxisConcatenator
 42 from numpy.lib.polynomial import _lstsq, _single_eps, _double_eps
 43

ImportError: cannot import name AxisConcatenator

In [2]:

-

-- 
Zhuanshi He / Z. He (PhD)
Waterloo Centre for Atmospheric Sciences (WCAS)
Department of Earth and Environmental Sciences
Phy Bldg, Rm 2022
University of Waterloo,
Waterloo, ON N2L 3G1
Canada
Tel: +1-519-888-4567 ext 38053FAX: +1-519-746-0435

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users