Discussion:
[Matplotlib-users] Matplotlib & Basemap / What is the Best Graphical Back-end for Raster Data Display (.png) ?
Claude Falbriard
2016-03-03 11:34:34 UTC
Permalink
Dear colleagues,

I like to receive an advice about the best back-end choice for Matplotlib
& Basemap to generate large .png images in a background processing mode.
Having issues with the pre-compiled "Agg" package which does not work
under my machine architecture. Also not able to recompile the Agg 2.5
package as its build throws an error at the build script autogen.sh.
Error:

./configure: line 15546: syntax error near unexpected token
`$SDL_VERSION,'
./configure: line 15546: `AM_PATH_SDL($SDL_VERSION,'

When bypassing this line it runs into another dependency which is blocking
the make install process.

libtool: link: cannot find the library
`../src/platform/X11/libaggplatformX11.la' or unhandled argument
`../src/platform/X11/libaggplatformX11.la'
Makefile:1166: recipe for target 'aa_demo' failed
make[1]: *** [aa_demo] Error 1
make[1]: Leaving directory '/data/Downloads/agg/agg-2.5/examples'
Makefile:481: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1

I do not plan to use any interactive access, so my guess is that excluding
X11 libraries should work OK.

My test showed that the "Cairo" package is working fine, but its quality
(vector oriented) is not as good compared to the Agg raster display. Case
the "Agg"
is not able to install on my machine, is there an alternate graphical
back-end available under SuSE environments?


Regards,

Claude Falbriard
Certified IT Specialist L2 - Middleware


Phone: 55-13-99662-5703 | Mobile: 55-13-98117-3316
E-mail: ***@br.ibm.com
Benjamin Root
2016-03-03 14:43:51 UTC
Permalink
Matplotlib will not work at all without AGG. Even the AGG-less backends
still use AGG for image handling (imshow() and such).

We can not guarantee that matplotlib would work with agg 2.5, as that is
the GPL'ed version. We develop against a patched 2.4 branch of AGG (which
is BSD-licensed), which is distributed with our source, and is built as
part of our build process. Have you tried building matplotlib directly from
our source without a system install of AGG?

Cheers
Ben Root
Post by Claude Falbriard
Dear colleagues,
I like to receive an advice about the best back-end choice for Matplotlib
& Basemap to generate large .png images in a background processing mode.
Having issues with the pre-compiled "Agg" package which does not work
under my machine architecture. Also not able to recompile the Agg 2.5
package as its build throws an error at the build script autogen.sh.
./configure: line 15546: syntax error near unexpected token `$SDL_VERSION,'
./configure: line 15546: `AM_PATH_SDL($SDL_VERSION,'
When bypassing this line it runs into another dependency which is blocking
the make install process.
libtool: link: cannot find the library
`../src/platform/X11/libaggplatformX11.la' or unhandled argument
`../src/platform/X11/libaggplatformX11.la'
Makefile:1166: recipe for target 'aa_demo' failed
make[1]: *** [aa_demo] Error 1
make[1]: Leaving directory '/data/Downloads/agg/agg-2.5/examples'
Makefile:481: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
I do not plan to use any interactive access, so my guess is that excluding
X11 libraries should work OK.
My test showed that the "Cairo" package is working fine, but its quality
(vector oriented) is not as good compared to the Agg raster display. Case
the "Agg"
is not able to install on my machine, is there an alternate graphical
back-end available under SuSE environments?
Regards,
*Claude Falbriard*
Certified IT Specialist L2 - Middleware
------------------------------
*Phone:*55-13-99662-5703 | *Mobile:*55-13-98117-3316
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Jerzy Karczmarczuk
2016-03-03 15:05:50 UTC
Permalink
Post by Benjamin Root
Matplotlib will not work at all without AGG. Even the AGG-less
backends still use AGG for image handling (imshow() and such).
Is it so? I never found such strong statement in the docs.

1. SVG backend produces vector graphics, no rasterisation in principle,
so why AGG?
2. Cairo uses its own engine. Why AGG?
3. Image (PNG) "production" from curves, etc. uses AntiGrain, but if
imshow() shows an image which is just a pixel array, there is no
manipulation needing AGG, an element (triple RGB) becomes a pixel, and
that's it.

Jerzy Karczmarczuk
Benjamin Root
2016-03-03 15:35:28 UTC
Permalink
AGG is used for image handling, particularly for handling transforms,
scaling, interpolation and such. The AxesImage object that you get from
calling imshow() is handled through the AGG library. This is true
regardless of the backend being used because it is based in the AxesImage
class (and others). An SVG of a plot that used imshow() has raster data in
it that comes from AGG (and you can choose to rasterize other things, as
well). Cairo still needs the image buffer.

So, the distinction is the use of the AGG library, and the use of the AGG
backend. The AGG library is required, but the AGG backend is not (but
highly recommended).

I will admit that I didn't have this distinction very clear in my own head
until very recently when reviewing some PRs that reworked the image
handling architecture. I hope that clears it up for you, too.

Cheers!
Ben Root


On Thu, Mar 3, 2016 at 10:05 AM, Jerzy Karczmarczuk <
Post by Jerzy Karczmarczuk
Post by Benjamin Root
Matplotlib will not work at all without AGG. Even the AGG-less
backends still use AGG for image handling (imshow() and such).
Is it so? I never found such strong statement in the docs.
1. SVG backend produces vector graphics, no rasterisation in principle,
so why AGG?
2. Cairo uses its own engine. Why AGG?
3. Image (PNG) "production" from curves, etc. uses AntiGrain, but if
imshow() shows an image which is just a pixel array, there is no
manipulation needing AGG, an element (triple RGB) becomes a pixel, and
that's it.
Jerzy Karczmarczuk
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Claude Falbriard
2016-03-03 18:47:53 UTC
Permalink
Dear colleagues,

Yes, I've downloaded the latest stable image of Matplotlib source from the
pypi repository matplotlib-1.5.1.tar.gz, running the commands: sudo python
setup.py build and sudo python setup.py install.

When executing larger plots, the Agg crashes with a segmentation fault
message. My guess is that the c header files are not compiled with the
correct platform setting (s390x). Is there a way to rebuild
the c prerequisites used by the embedded Agg framework?

Thanks in advance for your advice.

Regards,

Claude Falbriard
Certified IT Specialist L2 - Middleware


Phone: 55-13-99662-5703 | Mobile: 55-13-98117-3316
E-mail: ***@br.ibm.com




From: Benjamin Root <***@gmail.com>
To: Claude Falbriard/Brazil/***@IBMBR
Cc: Matplotlib Users <matplotlib-***@lists.sourceforge.net>
Date: 03/03/2016 11:44
Subject: Re: [Matplotlib-users] Matplotlib & Basemap / What is the
Best Graphical Back-end for Raster Data Display (.png) ?



Matplotlib will not work at all without AGG. Even the AGG-less backends
still use AGG for image handling (imshow() and such).

We can not guarantee that matplotlib would work with agg 2.5, as that is
the GPL'ed version. We develop against a patched 2.4 branch of AGG (which
is BSD-licensed), which is distributed with our source, and is built as
part of our build process. Have you tried building matplotlib directly
from our source without a system install of AGG?

Cheers
Ben Root


On Thu, Mar 3, 2016 at 6:34 AM, Claude Falbriard <***@br.ibm.com>
wrote:
Dear colleagues,

I like to receive an advice about the best back-end choice for Matplotlib
& Basemap to generate large .png images in a background processing mode.
Having issues with the pre-compiled "Agg" package which does not work
under my machine architecture. Also not able to recompile the Agg 2.5
package as its build throws an error at the build script autogen.sh.
Error:

./configure: line 15546: syntax error near unexpected token
`$SDL_VERSION,'
./configure: line 15546: `AM_PATH_SDL($SDL_VERSION,'

When bypassing this line it runs into another dependency which is blocking
the make install process.

libtool: link: cannot find the library
`../src/platform/X11/libaggplatformX11.la' or unhandled argument
`../src/platform/X11/libaggplatformX11.la'
Makefile:1166: recipe for target 'aa_demo' failed
make[1]: *** [aa_demo] Error 1
make[1]: Leaving directory '/data/Downloads/agg/agg-2.5/examples'
Makefile:481: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1

I do not plan to use any interactive access, so my guess is that excluding
X11 libraries should work OK.

My test showed that the "Cairo" package is working fine, but its quality
(vector oriented) is not as good compared to the Agg raster display. Case
the "Agg"
is not able to install on my machine, is there an alternate graphical
back-end available under SuSE environments?

Regards,

Claude Falbriard
Certified IT Specialist L2 - Middleware


Phone:55-13-99662-5703 | Mobile:55-13-98117-3316
E-mail: ***@br.ibm.com

Loading...