seeking matplotlib install advice

belinda thom bthom at cs.hmc.edu
Sun Dec 3 23:15:32 PST 2006


Hi,

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  
matplotlib.sourceforge.net/interactive.html, 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 ?
     IPython.Shell.start().mainloop()
   [snip]
   File "/opt/local/lib/python2.4/site-packages/matplotlib/backends/ 
backend_tkagg.py", line 8, in ?
     import tkagg                 # Paint image to Tk photo blitter  
extension
   File "/opt/local/lib/python2.4/site-packages/matplotlib/backends/ 
tkagg.py", 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.

--b




More information about the macports-users mailing list