plt.figure.show() not working in Ubuntu

Hi all,

I am getting the following error message:

'Figure' object has no attribute 'show'

When running matplotlib in Ubuntu 12.04, with matplotlib 1.2.x and pylab 1.6.2.

The code is set up as such:

fig = pylab.figure()
...
fig.show()

This works fine on Mac OSX 10.6 with matplotlib 1.1.0 and pylab 1.6.1

Any thoughts or similar experiences?

Thanks!

Josh

I doubt that ever should have worked. If it did, then something was seriously messed up. Also, note there isnt really a package called “pylab”. There is a special sub-module in matplotlib called pylab, that you typically do “from pylab import *” with. The version number you are giving more likely corresponds to the numpy version number.

The show() function is a part of the pyplot and pylab namespaces.

Ben Root

···

On Thursday, July 26, 2012, Joshua Koehler wrote:

Hi all,

I am getting the following error message:

‘Figure’ object has no attribute ‘show’

When running matplotlib in Ubuntu 12.04, with matplotlib 1.2.x and pylab 1.6.2.

The code is set up as such:

fig = pylab.figure()

fig.show()

This works fine on Mac OSX 10.6 with matplotlib 1.1.0 and pylab 1.6.1

Any thoughts or similar experiences?

Thanks!

Josh