FW: matplotlib

Hi,

We have an error when running python matplotlib. Please assist. Thanks in advance! J

[cheungcwe@…3056…:/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()))

[root@…3056…~]# uname -a

Linux plap03 2.6.18-128.el5 #1 SMP Wed Jan 21 10:41:14 EST 2009 x86_64 x86_64 x86_64 GNU/Linux

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 matplotlib

print matplotlib.version

0.99.1.1

[root@…3056… ~]# gcc --version

gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-46)

Copyright © 2006 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Regards,

Padma Tan

Genome Institute of Singapore

60 Biopolis Street, Genome

#02-01 Singapore 138672

DID : 6478 8671

Fax : 6478 9058

email: tanwp@…3055…

···

This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its contents to any other person. Thank you.


Try specifying a gui backend like TkAgg, Qt4Agg, GtkAgg in your
matplotlibrc file. For more information on this file, see
http://matplotlib.sourceforge.net/users/customizing.html

Darren

···

On Wed, Apr 7, 2010 at 4:09 AM, Padma TAN <tanwp@...3055...> wrote:

Hi,

We have an error when running python matplotlib. Please assist. Thanks in
advance! J

[cheungcwe@...3056...:/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()))

Hello,

Hi,

We have an error when running python matplotlib. Please assist. Thanks in
advance! J

[cheungcwe@...3056...:/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,

···

On Wed, Apr 7, 2010 at 10:09, Padma TAN <tanwp@...3055...> wrote:
--
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

Use a different backend.

Alan Isaac

···

On 4/7/2010 4:09 AM, Padma TAN wrote:

Your currently selected backend, 'agg' does not support show().