Hello,

On Wed, Apr 7, 2010 at 10:09, Padma TAN <ta...@gis.a-star.edu.sg> wrote:
>
>
> Hi,
>
> We have an error when running python matplotlib. Please assist. Thanks in
> advance! J
>
>
> [cheung...@changeme:/home/cheungcwe/CB3] python Python 2.6.2 (r262:71600,
> Sep 15 2009, 01:44:49) [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import pylab
>>>> pylab.scatter([1,2,3],[1,2,3])
> <matplotlib.collections.CircleCollection object at 0x1d013090>
>>>> pylab.show()
> /usr/local/python2.6/lib/python2.6/site-packages/matplotlib/backends/__init__.py:41:
> UserWarning:
> Your currently selected backend, 'agg' does not support show().
> Please select a GUI backend in your matplotlibrc file
> ('/usr/local/python2.6/lib/python2.6/site-packages/matplotlib/mpl-data/matplotlibrc')
> or with matplotlib.use()
>   (backend, matplotlib.matplotlib_fname()))

The problem is described here: in the matplotlibrc file, that's the
configuration file for mpl (so it's possibly the system one, in
/etc/), you have line like

backend = 'Agg'

The agg backend can't be used for interactive usage, so it doesn't
support any show() method, but only the one to save the figure as a
file, with savefig(). if you want to use mpl interactive, set the
backend to 'TkAgg' (it should be available on your system too) or
'GtkAgg' if you use Gnome or 'Qt4Agg' if you use KDE.

For more information, research for "matplotlib backend" in the mpl
documentation or on google

Regards,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to