Matplotlib 1.2.x + Python 3.2.3 + Numpy 1.6.2

Dear all,

I successfully installed Python 3.2.3 + Numpy 1.6.2 + Matplotlib 1.2.x (Git version). I tried the following command sequence line by line:

huskier@…4123…:~/Programming/Python/Python-3.2.3$ python3.2

Python 3.2.3 (default, Jun 30 2012, 07:14:35)

[GCC 4.4.5] on linux2

Type “help”, “copyright”, “credits” or “license” for more information.

>>> import matplotlib.pyplot as plt

>>> plt.plot(range(10), range(10))

[<matplotlib.lines.Line2D object at 0x3c6f1d0>]

>>> plt.show()

However, nothing happens when I typed plt.show(). There should be a figure window which I can get using python 2.6.

I do not know what’s wrong with my installation. OR matplotlib cannot be used with python 3? Any ideas?

Best regards,

Simon

Most likely, you didn’t have the Dec packages for any of the toolkits available. Check your build log.

Ben Root

···

On Saturday, June 30, 2012, Youbao Zhang wrote:

Dear all,

I successfully installed Python 3.2.3 + Numpy 1.6.2 + Matplotlib 1.2.x (Git version). I tried the following command sequence line by line:

huskier@…4123…:~/Programming/Python/Python-3.2.3$ python3.2

Python 3.2.3 (default, Jun 30 2012, 07:14:35)

[GCC 4.4.5] on linux2

Type “help”, “copyright”, “credits” or “license” for more information.

>>> import matplotlib.pyplot as plt

>>> plt.plot(range(10), range(10))

[<matplotlib.lines.Line2D object at 0x3c6f1d0>]

>>> plt.show()

However, nothing happens when I typed plt.show(). There should be a figure window which I can get using python 2.6.

I do not know what’s wrong with my installation. OR matplotlib cannot be used with python 3? Any ideas?

Best regards,

Simon

Did you create a `setup.cfg` file and enable `backend = TkAgg` before building matplotlib? Otherwise add a `import matplotlib;matplotlib.use("TkAgg")` statement at the top of the script.

Christoph

···

On 6/30/2012 11:45 AM, Youbao Zhang wrote:

Dear all,

I successfully installed Python 3.2.3 + Numpy 1.6.2 + Matplotlib 1.2.x
(Git version). I tried the following command sequence line by line:

huskier@...4123...:~/Programming/Python/Python-3.2.3$ python3.2
Python 3.2.3 (default, Jun 30 2012, 07:14:35)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
*>>> import matplotlib.pyplot as plt*
*>>> plt.plot(range(10), range(10))*
[<matplotlib.lines.Line2D object at 0x3c6f1d0>]
*>>> plt.show()*

However, nothing happens when I typed plt.show(). There should be a
figure window which I can get using python 2.6.

I do not know what's wrong with my installation. OR matplotlib cannot be
used with python 3? Any ideas?

Best regards,

Simon

Thank you both of you.

The problem is that I did not have tk-dev packages before I compiled Python3.2.3. After installing tk-dev and recompiled Python3.2.3 and matplotlib 1.2.x with a setup.cfg file and enable backend = TkAgg, I can show the picture windows.

So exciting!

Best regards,

Simon

···

On Sun, Jul 1, 2012 at 3:39 AM, Christoph Gohlke <cgohlke@…2143…> wrote:

On 6/30/2012 11:45 AM, Youbao Zhang wrote:

Dear all,

I successfully installed Python 3.2.3 + Numpy 1.6.2 + Matplotlib 1.2.x

(Git version). I tried the following command sequence line by line:

huskier@…4123…:~/Programming/Python/Python-3.2.3$ python3.2

Python 3.2.3 (default, Jun 30 2012, 07:14:35)

[GCC 4.4.5] on linux2

Type “help”, “copyright”, “credits” or “license” for more information.

>>> import matplotlib.pyplot as plt

>>> plt.plot(range(10), range(10))

[<matplotlib.lines.Line2D object at 0x3c6f1d0>]

>>> plt.show()

However, nothing happens when I typed plt.show(). There should be a

figure window which I can get using python 2.6.

I do not know what’s wrong with my installation. OR matplotlib cannot be

used with python 3? Any ideas?

Best regards,

Simon

Did you create a setup.cfg file and enable backend = TkAgg before

building matplotlib? Otherwise add a `import

matplotlib;matplotlib.use(“TkAgg”)` statement at the top of the script.

Christoph


Live Security Virtual Conference

Exclusive live event will cover all the ways today’s security and

threat landscape has changed and how IT managers can respond. Discussions

will include endpoint security, mobile security and the latest in malware

threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users