Display problem on CentOS

Hi.

I want to install Matplotlib from source code on CentOS.
I've been using Matplotlib for a year.
But this is the first time for me to install CentOS by myself.

I installed CentOS 6.2 in basic install option.
Next, I installed NumPy and Matplotlib.
.matplotlibrc isn't set.

It looks successfully installed, but when I type show() command,
nothing appears.
I can export PNG image by using savefig() command, so maybe
I'm using invalid backend.

How can I display plots with show() command?

Magician

I had the same problem on Debian.
Editing the matplotlibrc (should be installed somewhere in your
systeme) and changing the "backend" variable to Qt4Agg did the trick.

···

On Tue, Mar 27, 2012 at 12:14 AM, Magician <f_magician@...935...> wrote:

Hi.

I want to install Matplotlib from source code on CentOS.
I've been using Matplotlib for a year.
But this is the first time for me to install CentOS by myself.

I installed CentOS 6.2 in basic install option.
Next, I installed NumPy and Matplotlib.
.matplotlibrc isn't set.

It looks successfully installed, but when I type show() command,
nothing appears.
I can export PNG image by using savefig() command, so maybe
I'm using invalid backend.

How can I display plots with show() command?

Magician

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Thank you, Alexis.

I try to install PyQt4 and set Qt4Agg just now, but nothing displayed.
Ummm...what's wrong...??

Magician

···

On 2012/03/27, at 17:05, Alexis Praga wrote:

I had the same problem on Debian.
Editing the matplotlibrc (should be installed somewhere in your
systeme) and changing the "backend" variable to Qt4Agg did the trick.

On Tue, Mar 27, 2012 at 12:14 AM, Magician <f_magician@...935...> wrote:

Hi.

I want to install Matplotlib from source code on CentOS.
I've been using Matplotlib for a year.
But this is the first time for me to install CentOS by myself.

I installed CentOS 6.2 in basic install option.
Next, I installed NumPy and Matplotlib.
.matplotlibrc isn't set.

It looks successfully installed, but when I type show() command,
nothing appears.
I can export PNG image by using savefig() command, so maybe
I'm using invalid backend.

How can I display plots with show() command?

Magician

You can check you are editing the correct configuration file with (in
the Python shell) :

import matplotlib
matplotlib.matplotlib_fname()

You can also try other backends. For a list, see :
http://matplotlib.sourceforge.net/faq/usage_faq.html#what-is-a-backend

···

On Tue, Mar 27, 2012 at 2:46 PM, Magician <f_magician@...935...> wrote:

Thank you, Alexis.

I try to install PyQt4 and set Qt4Agg just now, but nothing displayed.
Ummm...what's wrong...??

Magician

On 2012/03/27, at 17:05, Alexis Praga wrote:

I had the same problem on Debian.
Editing the matplotlibrc (should be installed somewhere in your
systeme) and changing the "backend" variable to Qt4Agg did the trick.

On Tue, Mar 27, 2012 at 12:14 AM, Magician <f_magician@...935...> wrote:

Hi.

I want to install Matplotlib from source code on CentOS.
I've been using Matplotlib for a year.
But this is the first time for me to install CentOS by myself.

I installed CentOS 6.2 in basic install option.
Next, I installed NumPy and Matplotlib.
.matplotlibrc isn't set.

It looks successfully installed, but when I type show() command,
nothing appears.
I can export PNG image by using savefig() command, so maybe
I'm using invalid backend.

How can I display plots with show() command?

Magician

Hi.

I want to install Matplotlib from source code on CentOS.
I've been using Matplotlib for a year.
But this is the first time for me to install CentOS by myself.

I installed CentOS 6.2 in basic install option.
Next, I installed NumPy and Matplotlib.
.matplotlibrc isn't set.

It looks successfully installed, but when I type show() command,
nothing appears.
I can export PNG image by using savefig() command, so maybe
I'm using invalid backend.

It sounds like the problem is that you installed mpl without having installed the dependencies for any of the interactive backends. See

http://matplotlib.sourceforge.net/users/installing.html

Eric

···

On 03/26/2012 12:14 PM, Magician wrote:

How can I display plots with show() command?

Magician

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Alexis & Eric

Thanks for your advices.
I've been trying, but I still have some problems.

I tried matplotlib.matplotlib_fname() and I found my silly mistake.
Python answered '/usr/local/lib/python2.7/site-packages/matplotlib/mpl-data/matplotlibrc'
My RC file was named ".matplotlibrc".
When the prefixed dot removed, it works perfectly.

And I found to change the backends by using matplotlib.use() command.
I tried all of them, but nothing worked (with errors).

When using matplotlib.get_backend() on pre-installed python2.6,
it said 'GTKAgg' and matplotlib.pyplot.show() exactly worked.
So I tried to install PyGTK from source code, but it's fairly complicated.

Is there an easy way to install backends for additionally installed Python?
My python is v2.7.2.

Magician

···

On 2012/03/27, at 23:04, Alexis Praga wrote:

You can check you are editing the correct configuration file with (in
the Python shell) :

import matplotlib
matplotlib.matplotlib_fname()

You can also try other backends. For a list, see :
http://matplotlib.sourceforge.net/faq/usage_faq.html#what-is-a-backend

On Tue, Mar 27, 2012 at 2:46 PM, Magician <f_magician@...935...> wrote:

Thank you, Alexis.

I try to install PyQt4 and set Qt4Agg just now, but nothing displayed.
Ummm...what's wrong...??

Magician

On 2012/03/27, at 17:05, Alexis Praga wrote:

I had the same problem on Debian.
Editing the matplotlibrc (should be installed somewhere in your
systeme) and changing the "backend" variable to Qt4Agg did the trick.

On Tue, Mar 27, 2012 at 12:14 AM, Magician <f_magician@...935...> wrote:

Hi.

I want to install Matplotlib from source code on CentOS.
I've been using Matplotlib for a year.
But this is the first time for me to install CentOS by myself.

I installed CentOS 6.2 in basic install option.
Next, I installed NumPy and Matplotlib.
.matplotlibrc isn't set.

It looks successfully installed, but when I type show() command,
nothing appears.
I can export PNG image by using savefig() command, so maybe
I'm using invalid backend.

How can I display plots with show() command?

Magician

Alexis& Eric

Thanks for your advices.
I've been trying, but I still have some problems.

I tried matplotlib.matplotlib_fname() and I found my silly mistake.
Python answered '/usr/local/lib/python2.7/site-packages/matplotlib/mpl-data/matplotlibrc'
My RC file was named ".matplotlibrc".
When the prefixed dot removed, it works perfectly.

And I found to change the backends by using matplotlib.use() command.
I tried all of them, but nothing worked (with errors).

When using matplotlib.get_backend() on pre-installed python2.6,
it said 'GTKAgg' and matplotlib.pyplot.show() exactly worked.
So I tried to install PyGTK from source code, but it's fairly complicated.

Is there an easy way to install backends for additionally installed Python?
My python is v2.7.2.

Can you find CentOS packages for any of the gui toolkits for your python version? pygtk, pyqt4, tkinter, wxpython--any of them? If so, you should be just about set. Only pygtk and tkinter would even require rebuilding mpl; pyqt4 and wxpython don't require any mpl extension code.

Eric

···

On 03/31/2012 04:02 AM, Magician wrote:

Magician

On 2012/03/27, at 23:04, Alexis Praga wrote:

You can check you are editing the correct configuration file with (in
the Python shell) :

import matplotlib
matplotlib.matplotlib_fname()

You can also try other backends. For a list, see :
http://matplotlib.sourceforge.net/faq/usage_faq.html#what-is-a-backend

On Tue, Mar 27, 2012 at 2:46 PM, Magician<f_magician@...935...> wrote:

Thank you, Alexis.

I try to install PyQt4 and set Qt4Agg just now, but nothing displayed.
Ummm...what's wrong...??

Magician

On 2012/03/27, at 17:05, Alexis Praga wrote:

I had the same problem on Debian.
Editing the matplotlibrc (should be installed somewhere in your
systeme) and changing the "backend" variable to Qt4Agg did the trick.

On Tue, Mar 27, 2012 at 12:14 AM, Magician<f_magician@...935...> wrote:

Hi.

I want to install Matplotlib from source code on CentOS.
I've been using Matplotlib for a year.
But this is the first time for me to install CentOS by myself.

I installed CentOS 6.2 in basic install option.
Next, I installed NumPy and Matplotlib.
.matplotlibrc isn't set.

It looks successfully installed, but when I type show() command,
nothing appears.
I can export PNG image by using savefig() command, so maybe
I'm using invalid backend.

How can I display plots with show() command?

Magician

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options