emitan 0 Newbie Poster

Hi all.

There might be a simple solution to this but I've been googling for quite a while for a solution...
I want to get the plots generated by the module matplotlib from Python in an interactive window so I can save the graph.
I'm using Ubuntu 9.10 and things I have installed are Python 2.6.4, numpy 1.3.0, matplotlib 0.99.1.1, tcl 8.5.8 and ipython-0.10.

import matplotlib
matplotlib.use('TkAgg')
from pylab import *
plot([1,2])
show()

and get the following:

$ python test.py
Traceback (most recent call last):
  File "test.py", line 3, in <module>
    from pylab import *
  File "/usr/local/lib/python2.6/site-packages/pylab.py", line 1, in <module>
    from matplotlib.pylab import *
  File "/usr/local/lib/python2.6/site-packages/matplotlib/pylab.py", line 247, in <module>
    from matplotlib.pyplot import *
  File "/usr/local/lib/python2.6/site-packages/matplotlib/pyplot.py", line 78, in <module>
    new_figure_manager, draw_if_interactive, show = pylab_setup()
  File "/usr/local/lib/python2.6/site-packages/matplotlib/backends/__init__.py", line 25, in pylab_setup
    globals(),locals(),[backend_name])
  File "/usr/local/lib/python2.6/site-packages/matplotlib/backends/backend_tkagg.py", line 8, in <module>
    import tkagg                 # Paint image to Tk photo blitter extension
  File "/usr/local/lib/python2.6/site-packages/matplotlib/backends/tkagg.py", line 1, in <module>
    import _tkagg
ImportError: No module named _tkagg

I've tried ipython as well but if I can I'd prefer to get the graphs without it.
I realise this might be just something simple I'm missing but if you could help me on this that'll be great.

Cheers.