[Matplotlib-users] Matplotlib with native OSX port of GTK

2008-11-10 Thread Marcus Vinicius Eiffle Duarte
Hi, folks!

I am trying to compile matplotlib-0.98.3 on OSX 10.5.5. with support
for the native port of GTK-2.0 (www.gtk-osx.org). I am doing this
because the official egg gives an error when my GUIs try to create a
canvas using GTK (with all renderers: GDK, Agg or Cairo). I assume the
official egg was compiled without support for GTK on OSX.
I compiled GTK-2.0 and PyGTK using code and instructions from Imendio,
and it all works fine. The apps I developed on a Ubuintu system run
fine on OSX, except for the matplotlib part.
So, all the libraries and headers are installed in the default
folders. However, when I try to  build matplotlib I get the following
error:

macproctp8:matplotlib-0.98.3 ctp8$ python setup.py build

BUILDING MATPLOTLIB
matplotlib: 0.98.3
python: 2.5.1 (r251:54863, Apr 15 2008, 22:57:26)  [GCC
4.0.1 (Apple Inc. build 5465)]
  platform: darwin

REQUIRED DEPENDENCIES
 numpy: 1.3.0.dev5934
 freetype2: found, but unknown version (no pkg-config)

OPTIONAL BACKEND DEPENDENCIES
libpng: 1.2.32
   Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4
  wxPython: 2.8.4.0
* WxAgg extension not required for wxPython >= 2.8
  Gtk+: gtk+: 2.15.0, glib: 2.19.1, pygtk: 2.13.1,
pygobject: 2.15.5
* Could not find Gtk+ headers in any of
* '/usr/include', '/usr/X11R6/include', '.'
Qt: no
   Qt4: no
 Cairo: 1.4.12

OPTIONAL DATE/TIMEZONE DEPENDENCIES
  datetime: present, version unknown
  dateutil: present, version unknown
/Library/Python/2.5/site-packages/pytz-2008g-py2.5.egg/pytz/__init__.py:32:
UserWarning: Module dateutil was already imported from
/Library/Python/2.5/site-packages/dateutil-1.2-py2.4.egg/dateutil/__init__.pyc,
but /Library/Python/2.5/site-packages/matplotlib-0.98.3-py2.5-macosx-10.3.egg
is being added to sys.path
/Library/Python/2.5/site-packages/pytz-2008g-py2.5.egg/pytz/__init__.py:32:
UserWarning: Module pytz was already imported from
/Library/Python/2.5/site-packages/pytz-2008g-py2.5.egg/pytz/__init__.py,
but /Library/Python/2.5/site-packages/matplotlib-0.98.3-py2.5-macosx-10.3.egg
is being added to sys.path
  pytz: 2008g

OPTIONAL USETEX DEPENDENCIES
dvipng: 1.11
   ghostscript: 8.62
 latex: 3.1415926

EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES
 configobj: matplotlib will provide
  enthought.traits: no

[Edit setup.cfg to suppress the above messages]

running build
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc ->
build/lib.macosx-10.5-i386-2.5/matplotlib/mpl-data
copying lib/matplotlib/mpl-data/matplotlib.conf ->
build/lib.macosx-10.5-i386-2.5/matplotlib/mpl-data
running build_ext
building 'matplotlib.backends._backend_gdk' extension
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp
-mno-fused-madd -fno-common -dynamic -DNDEBUG -g -Os -Wall
-Wstrict-prototypes -DMACOSX -I/usr/include/ffi -DENABLE_DTRACE -arch
i386 -arch ppc -pipe
-I/Library/Python/2.5/site-packages/numpy-1.3.0.dev5934-py2.5-macosx-10.3-i386.egg/numpy/core/include
-I/usr/include -I/usr/X11R6/include -I. -I/usr/include
-I/usr/X11R6/include -I.
-I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5
-c src/backend_gdk.c -o
build/temp.macosx-10.5-i386-2.5/src/backend_gdk.o
In file included from src/backend_gdk.c:9:
/usr/include/pygtk/pygtk.h:6:23: error: pygobject.h: No such file or directory
/usr/include/pygtk/pygtk.h:8:21: error: gtk/gtk.h: No such file or directory
In file included from src/backend_gdk.c:9:
/usr/include/pygtk/pygtk.h:14: error: syntax error before 'atom'
/usr/include/pygtk/pygtk.h:17: error: syntax error before '*' token
/usr/include/pygtk/pygtk.h:18: error: syntax error before '*' token
/usr/include/pygtk/pygtk.h:19: error: syntax error before '}' token
/usr/include/pygtk/pygtk.h:24: error: syntax error before 'gchar'
src/backend_gdk.c: In function 'pixbuf_get_pixels_array':
src/backend_gdk.c:28: error: 'PyGObject' undeclared (first use in this function)
src/backend_gdk.c:28: error: (Each undeclared identifier is reported only once
src/backend_gdk.c:28: error: for each function it appears in.)
src/backend_gdk.c:28: error: 'py_pixbuf' undeclared (first use in this function)
src/backend_gdk.c:29: error: 'GdkPixbuf' undeclared (first use in this function)
src/backend_gdk.c:29: error: 'gdk_pixbuf' undeclared (first use in
this function)
src/backend_gdk.c:37: warning: implicit declaration of function 'GDK_PIXBUF'
src/backend_gdk.c:43: warning: implicit declaration of function
'gdk_pixbuf_get_height'
src/backend_gdk.c:44: warning: implicit de

Re: [Matplotlib-users] Python 2.6

2008-11-10 Thread Michael Droettboom
Great.  Does this mean we can close the bug?

Mike

John Hunter wrote:
> On Sat, Nov 8, 2008 at 10:39 PM, Jae-Joon Lee <[EMAIL PROTECTED]> wrote:
>   
>> John,
>> I'm attaching an another patch, which seems to give a correct result
>> for the figimage_demo.
>> The flipud_out() calls before compositing seems to have no effect, so
>> 
>
> Ahh, I think you found the ultimate source of our woes and flupud
> complexity: the _image.from_images module was ignoring the stride, as
> you noted in the comment in your patch.  I just fixed this n r6381, so
> the code behaves properly at the extension code level and we don't
> have to do all those confusing flips in the axes or figure compositing
> methods.  So the code is now simpler, and it works.
>
> Thanks for digging into this.
>
> JDH
>   

-- 
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] Installation problem

2008-11-10 Thread Frank Lagor
Hi,

I am sorry to bug you all with an installation problem, but I need
some additional help to get this figured out.

I previously had a matplotlib installed and working fine, but it was
necessary for me to redo some other installations like numpy when I
needed a complete lapack library.  This also led to me installing
another version of g77, because numpy needed a specific library that
was only provide by the g77 version of fortran for some reason.
Anyways, numpy works great but I went back to install matplotlib and I
ran into trouble.  After the installation process, if I try to import
matplotlib.pylab I get the following errors:

from matplotlib._path import affine_transform
ImportError: /ronaldo/pkg/dfranci/gcc-g77-3.4.6/lib64/libgcc_s.so.1:
version `GCC_4.2.0' not found (required by /usr/lib64/libstdc++.so.6)

Is this a problem that I can fix in the matplotlib installation or do
I need to go back up to the numpy installation?

I should note that I do not have gcc-4.2.0 on my system.

Thanks in advance,
Frank

-
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] Installation problem

2008-11-10 Thread Michael Droettboom
I don't know if this will help, but...

Python packages generally don't have proper dependency management when 
building.  That means, if an underlying dependency changes, it often 
doesn't rebuild enough to keep things in sync.  You may want to try 
rebuilding everything after first completely removing the "build" 
directory to force a complete rebuild.  Do numpy first then matplotlib.

...but maybe you've tried that already, in which case, I don't know off 
hand...

Mike

Frank Lagor wrote:
> Hi,
>
> I am sorry to bug you all with an installation problem, but I need
> some additional help to get this figured out.
>
> I previously had a matplotlib installed and working fine, but it was
> necessary for me to redo some other installations like numpy when I
> needed a complete lapack library.  This also led to me installing
> another version of g77, because numpy needed a specific library that
> was only provide by the g77 version of fortran for some reason.
> Anyways, numpy works great but I went back to install matplotlib and I
> ran into trouble.  After the installation process, if I try to import
> matplotlib.pylab I get the following errors:
>
> from matplotlib._path import affine_transform
> ImportError: /ronaldo/pkg/dfranci/gcc-g77-3.4.6/lib64/libgcc_s.so.1:
> version `GCC_4.2.0' not found (required by /usr/lib64/libstdc++.so.6)
>
> Is this a problem that I can fix in the matplotlib installation or do
> I need to go back up to the numpy installation?
>
> I should note that I do not have gcc-4.2.0 on my system.
>
> Thanks in advance,
> Frank
>
> -
> 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


Re: [Matplotlib-users] Installation problem

2008-11-10 Thread Frank Lagor
On Mon, Nov 10, 2008 at 3:46 PM, Michael Droettboom <[EMAIL PROTECTED]> wrote:
> I don't know if this will help, but...
>
> Python packages generally don't have proper dependency management when
> building.  That means, if an underlying dependency changes, it often doesn't
> rebuild enough to keep things in sync.  You may want to try rebuilding
> everything after first completely removing the "build" directory to force a
> complete rebuild.  Do numpy first then matplotlib.
>
> ...but maybe you've tried that already, in which case, I don't know off
> hand...
>
> Mike
>
> Frank Lagor wrote:
>>
>> Hi,
>>
>> I am sorry to bug you all with an installation problem, but I need
>> some additional help to get this figured out.
>>
>> I previously had a matplotlib installed and working fine, but it was
>> necessary for me to redo some other installations like numpy when I
>> needed a complete lapack library.  This also led to me installing
>> another version of g77, because numpy needed a specific library that
>> was only provide by the g77 version of fortran for some reason.
>> Anyways, numpy works great but I went back to install matplotlib and I
>> ran into trouble.  After the installation process, if I try to import
>> matplotlib.pylab I get the following errors:
>>
>> from matplotlib._path import affine_transform
>> ImportError: /ronaldo/pkg/dfranci/gcc-g77-3.4.6/lib64/libgcc_s.so.1:
>> version `GCC_4.2.0' not found (required by /usr/lib64/libstdc++.so.6)
>>
>> Is this a problem that I can fix in the matplotlib installation or do
>> I need to go back up to the numpy installation?
>>
>> I should note that I do not have gcc-4.2.0 on my system.
>>
>> Thanks in advance,
>> Frank
>>
>> -
>> 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
>
>

Thanks so much for the response, Mike.  Yes, I learned the hard way a
long time ago about having to rm -rf build/ when rebuilding python
packages.  I have tried this here, but I still have an issue.  I am
currently trying to rebuild with a different compiler and playing with
environment variables.  I would love any other suggestions.   Thanks,
Frank

-
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] Installation problem

2008-11-10 Thread Darren Dale
On Monday 10 November 2008 03:37:26 pm Frank Lagor wrote:
> Hi,
>
> I am sorry to bug you all with an installation problem, but I need
> some additional help to get this figured out.
>
> I previously had a matplotlib installed and working fine, but it was
> necessary for me to redo some other installations like numpy when I
> needed a complete lapack library.  This also led to me installing
> another version of g77, because numpy needed a specific library that
> was only provide by the g77 version of fortran for some reason.
> Anyways, numpy works great but I went back to install matplotlib and I
> ran into trouble.  After the installation process, if I try to import
> matplotlib.pylab I get the following errors:
>
> from matplotlib._path import affine_transform
> ImportError: /ronaldo/pkg/dfranci/gcc-g77-3.4.6/lib64/libgcc_s.so.1:
> version `GCC_4.2.0' not found (required by /usr/lib64/libstdc++.so.6)
>
> Is this a problem that I can fix in the matplotlib installation or do
> I need to go back up to the numpy installation?
>
> I should note that I do not have gcc-4.2.0 on my system.

Try removing the build/ directory from your mpl source directory, as well as 
your site-packages/matplotlib*, and recompile.
-
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] Installation problem

2008-11-10 Thread Frank Lagor
On Mon, Nov 10, 2008 at 4:00 PM, Darren Dale <[EMAIL PROTECTED]> wrote:
> On Monday 10 November 2008 03:37:26 pm Frank Lagor wrote:
>
>> Hi,
>
>>
>
>> I am sorry to bug you all with an installation problem, but I need
>
>> some additional help to get this figured out.
>
>>
>
>> I previously had a matplotlib installed and working fine, but it was
>
>> necessary for me to redo some other installations like numpy when I
>
>> needed a complete lapack library. This also led to me installing
>
>> another version of g77, because numpy needed a specific library that
>
>> was only provide by the g77 version of fortran for some reason.
>
>> Anyways, numpy works great but I went back to install matplotlib and I
>
>> ran into trouble. After the installation process, if I try to import
>
>> matplotlib.pylab I get the following errors:
>
>>
>
>> from matplotlib._path import affine_transform
>
>> ImportError: /ronaldo/pkg/dfranci/gcc-g77-3.4.6/lib64/libgcc_s.so.1:
>
>> version `GCC_4.2.0' not found (required by /usr/lib64/libstdc++.so.6)
>
>>
>
>> Is this a problem that I can fix in the matplotlib installation or do
>
>> I need to go back up to the numpy installation?
>
>>
>
>> I should note that I do not have gcc-4.2.0 on my system.
>
> Try removing the build/ directory from your mpl source directory, as well as
> your site-packages/matplotlib*, and recompile.

Hi Darren,

Yes, unfrotunately I tried this as well to no avail.

Thank you though,
Frank

-
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] legend markerscale not working

2008-11-10 Thread Orest Kozyar
On Ubuntu 8.10 (Intrepid Ibex) I'm using matplotlib 0.98.3 and would
like to use the markerscale to make my legend points smaller (e.g.
0.6).  However, it does not appear to be working.  The following code:

plot(arange(0, 100, .1), cos(arange(0, 100, .1)), 'ro', markersize=20,
lable='test')
legend(markerscale=0.5)

draws a legend that has markers the same size as the original plot.  I
saw someone posted on September 24, and had a response from someone.
For some reason, the response was blank (at least as it appears in the
list archives), so I thought I'd send another message to see if anyone
had figured out what needs to be done to get markerscale working?

Thanks
Orest

-
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] Land-Sea masks (mpl_toolkits.basemap)

2008-11-10 Thread Jeff Whitaker
Patrick Marsh wrote:
> Greetings,
>
> I have global data that I would like to plot using 
> mpl_toolkits.basemap.  The catch is that I want to mask out all data 
> over the ocean.  I know there is a function to fill 
> continents,map.fillcontinents(), but I can't seem to find one for 
> filling oceans.  Ideally, I want the oceans to show up with a white 
> background and no data contoured.
>
> Am I completely missing something or is this functionality missing?
>
>
> Thanks,
>
> -- 
> Patrick Marsh
> Graduate Research Assistant
> School of Meteorology
> University of Oklahoma

Patrick:  There is a drawlsmask method that can fill ocean and land 
pixels different colors.  See 
http://matplotlib.sourceforge.net/basemap/doc/html/api/basemap_api.html 
for details.  You can make the land transparent, and the ocean white for 
example. 
It's based on a 5 minute land/sea mask dataset, although you can use 
your own (as long as it's global and defined on a regular lat/lon grid).

-Jeff
> 
>
> -
> 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
>   


-
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