[GRASS-dev] grass + matplotlib on mac osx snow leopard

I installed matplotlib awhile back to test it (Leopard). It is quite nice and very versatile. I thought it could be a very nice addition. However, there were objections to another dependency and the suggestion that we should build our own graphing library. But this hasn't happened yet.

Michael

On Feb 8, 2010, at 6:18 PM, grass-dev-request@lists.osgeo.org wrote:

Date: Mon, 8 Feb 2010 18:34:16 -0600
From: William Kyngesburye <woklist@kyngchaos.com>
Subject: Re: [GRASS-dev] grass + matplotlib on mac osx snow leopard
To: Massimo Di Stefano <massimodisasha@gmail.com>
Cc: GRASS developers list <grass-dev@lists.osgeo.org>
Message-ID: <4AAFA49D-BD8B-44DD-9CD1-B286D77544CB@kyngchaos.com>
Content-Type: text/plain; charset=us-ascii

That's the matplotlib freetype module, but what about the freetype library used during matpotlib compilation?

On Feb 8, 2010, at 12:37 PM, Massimo Di Stefano wrote:

Hi William,

don't know if these note can help to know where is the problem :

The matplotlib freetype libs are build with both architecture :

GRASS 6.5.svn (spearfish60):~ > file /Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/ft2font.so
/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/ft2font.so: Mach-O universal binary with 2 architectures
/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/ft2font.so (for architecture i386): Mach-O bundle i386
/Library/Python/2.6/site-packages/matplotlib-1.0.svn_r7892-py2.6-macosx-10.6-universal.egg/matplotlib/ft2font.so (for architecture x86_64): Mach-O 64-bit bundle x86_64
GRASS 6.5.svn (spearfish60):~ >

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

The equator is so long, it could encircle the earth completely once.

Michael wrote:

I installed matplotlib awhile back to
test it (Leopard). It is quite nice and very versatile. I
thought it could be a very nice addition.

FWIW I'm already quite familiar with Matlab plotting (I use it almost
every day), so matplotlib (which is more or less a clone of that) would
be very natural for me to use. That shouldn't count for much, but I
expect I'm not alone.

However, there were objections to another dependency and the suggestion
that we should build our own graphing library. But this hasn't happened
yet.

I think it all depends on the level of how much we are going to use it,
and what doors it opens. If all we need to do is create a line graph it
is probably easier to write our own. But if we want to replace d.histogram
etc. with something more fancy, and other R-like goodness we haven't
thought of yet, I don't see much point in spending a large effort in
reinventing the wheel for something far from our primary business.

As matplotlib is a close colleague of numpy (which we already use for the
wxProfile tool), I don't think it is going too much further to request
numpy+matplotlib instead of just numpy. Find the packages for one, you'll
probably find the packages for both.

2c,
Hamish

Hi, i agree,
i come from matlab too, i find matplotlib a very "special" library to make plot.
(it has a really wel done "how to make graph" help page and a nice basemap library and more ...)

i'd like the idea to use matplotlib as standard grass tool to make graph.

come nack to the osx issue, i fix it :

i rebuild a fresh matplotlib svn code
the only problem i had is about png (lib and include files are not found)
to fix it i did a simlink from the UnixIO framework to usr/local :

sudo ln -s /Library/Frameworks/UnixImageIO.framework/unix/lib/libpng.dylib /usr/local/lib
sudo ln -s /Library/Frameworks/UnixImageIO.framework/unix/include/png.h /usr/local/include
sudo ln -s /Library/Frameworks/UnixImageIO.framework/unix/include/pngconf.h /usr/local/include

i don't know how/if can i avoid the sim-link .. but now it works :slight_smile:

a problem i'm having now, is about the wx module gui (maybe i need to use a more recent wx-python version)
beacouse the "save to file" prompt give me an "open file" prompt instead, see :

http://www.geofemengineering.it/data/r.ipso_save_file_prompt.png

regards,

Massimo.

Il giorno 09/feb/2010, alle ore 10.26, Hamish ha scritto:

Michael wrote:

I installed matplotlib awhile back to
test it (Leopard). It is quite nice and very versatile. I
thought it could be a very nice addition.

FWIW I'm already quite familiar with Matlab plotting (I use it almost
every day), so matplotlib (which is more or less a clone of that) would
be very natural for me to use. That shouldn't count for much, but I
expect I'm not alone.

However, there were objections to another dependency and the suggestion
that we should build our own graphing library. But this hasn't happened
yet.

I think it all depends on the level of how much we are going to use it,
and what doors it opens. If all we need to do is create a line graph it
is probably easier to write our own. But if we want to replace d.histogram
etc. with something more fancy, and other R-like goodness we haven't
thought of yet, I don't see much point in spending a large effort in
reinventing the wheel for something far from our primary business.

As matplotlib is a close colleague of numpy (which we already use for the
wxProfile tool), I don't think it is going too much further to request
numpy+matplotlib instead of just numpy. Find the packages for one, you'll
probably find the packages for both.

2c,
Hamish

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

On Tue, Feb 9, 2010 at 10:26 AM, Hamish <hamish_b@yahoo.com> wrote:
...

As matplotlib is a close colleague of numpy (which we already use for the
wxProfile tool), I don't think it is going too much further to request
numpy+matplotlib instead of just numpy. Find the packages for one, you'll
probably find the packages for both.

(Un)related:
Seems that more potential users waiting out there to access numpy and
friends in open source GIS:
http://sgillies.net/blog/997/more-features-like-open-source-python-gis-please/

We really need to improve the docs...

Markus