seeking matplotlib install advice

belinda thom bthom at
Sun Dec 3 23:15:32 PST 2006


I've installed matplotlib (v 0.87.6_0) via macports (os x 10.4.8,  
python 2.4.3). I've tried following the "interactive" instructions at, which tells me to modify  
matplotlibrc as follows:

interactive : True
backend : TkAgg

My general usage is via ipython -pylab, which should automatically  
setup the necessary extra thread for plotting, but I've seen similar  
behavior in vanilla python shells as well.

I can run matplotlib commands (e.g. plot([1,2,3])) but plot windows  
are never shown (even after I explicitly call show()). I can save the  
figure and view it as a pgn, so much is working.

When I configure matplotlibrc via the rec'd TkAgg backend, I get the  
following error:

Traceback (most recent call last):
   File "/opt/local/bin/ipython", line 28, in ?
   File "/opt/local/lib/python2.4/site-packages/matplotlib/backends/", line 8, in ?
     import tkagg                 # Paint image to Tk photo blitter  
   File "/opt/local/lib/python2.4/site-packages/matplotlib/backends/", line 1, in ?
     import _tkagg
ImportError: No module named _tkagg

A google search led me to believe I didn't have "the proper tcl-dev/ 
tk-dev" directories. I then noticed
there was a +gt2k macports matplotlib variant, and found another  
search snippet that led me to believe
installing this new variant might relieve my woes.

No such luck.

Has anyone gotten matplotlib to plot figures interactively in the  
macports/python24 setting?

Advice greatly appreciated.


More information about the macports-users mailing list