Problem with matplotlib

M

Mathias

Dear NG,

I need to draw a few images in the same window and found matplotlib to
be a very nice tool for my needs (thanks for the hint!).
But I have trouble installing matplotlib on RedHat9 - under XP it runs
just fine. I updated all the indicated packages except the agg package
which I didn't really understand. So output with default setting is:

[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.Bad key "toolbar" on line 30 in
/home/franzius/eclipse/workspace/Hierarchical SFA (moving
digits)/.matplotlibrc
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.3/site-packages/matplotlib/matlab.py", line
143, in ?
from backends import new_figure_manager, error_msg, \
File
"/usr/lib/python2.3/site-packages/matplotlib/backends/__init__.py", line
26, in ?
from backend_gtkagg import error_msg, draw_if_interactive, show,
new_figure_manager
File
"/usr/lib/python2.3/site-packages/matplotlib/backends/backend_gtkagg.py",
line 16, in ?
from _gtkagg import agg_to_gtk_drawable
ImportError: No module named _gtkagg

When I change the .matplotlibrc settings to backend: GTK it works but
then I can't reuse the image window as it seems. With WX I cant use imshow()

Are there precompiled binaries with the agg stuff for linux as for
windows? Or what do I have to install the agg sources myself
(compilation seemed ok, but what then)?

Sorry for my confusion and thanks for any help,
Mathias
 
J

John Hunter

Mathias> Are there precompiled binaries with the agg stuff for
Mathias> linux as for windows? Or what do I have to install the
Mathias> agg sources myself (compilation seemed ok, but what
Mathias> then)?

No precompiled binaries for redhat currently.

agg (http://antigrain.com) is the cornerstone renderer for matplotlib.
It is a 2d drawing library matplotlib uses to make the canvas and then
transfers this image to the GUI canvas. You don't need to download
anything extra, since agg come with the matplotlib src distribution.
I strongly recommend compiling agg in matplotlib by setting

BUILD_AGG = 1

in setup.py. You should then be able to use either the tkagg, gtkagg
or wxagg backends, provided you have set BUILD_TKAGG or BUILD_GTKAGG
etc in setup.py, and that you have the required GUI libraries as
described on http://matplotlib.sf.net/backends.html. On a linux box,
I use gtkagg. It is fastest and has very good support.

I'll be out of commission moving until Monday. Until then, you can
always try posting to the matplotlib-users mailing list if you
encounter more troubles.

Good luck!
JDH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,112
Latest member
VinayKumar Nevatia
Top