BUG: python exists when savefig(None) is called

I'm on Windows with python 2.5. How do I find the version of matplotlib? I think it is fairly recent (within last 6 months anyhow). Shouldn't an error be raised?

See:

C:\Dev\MyProjects\Bio\hmm\python>python
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from pylab import figure, savefig
>>> figure()
<matplotlib.figure.Figure instance at 0x0191D210>
>>> savefig(None)

C:\Dev\MyProjects\Bio\hmm\python>python

... and so back to DOS prompt

John.

Hi John,

I'm on Windows with python 2.5. How do I find the version of matplotlib?
I think it is fairly recent (within last 6 months anyhow).

import matplotlib
print matplotlib.__version__

Shouldn't an error be raised?

On my Kubuntu 7.10 and WinXP with matplotlib 0.91.2 an error is raised in
python and ipython. Something like:
<type 'exceptions.TypeError'>: Object does not appear to be a path or a Python
file-like object .

regards Matthias

···

On Wednesday 23 April 2008 12:28:11 John Reid wrote:

See:

C:\Dev\MyProjects\Bio\hmm\python>python
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.

>>> from pylab import figure, savefig
>>> figure()

<matplotlib.figure.Figure instance at 0x0191D210>

>>> savefig(None)

C:\Dev\MyProjects\Bio\hmm\python>python

... and so back to DOS prompt

John.

Matthias Michler wrote:
Hi John,

I'm on Windows with python 2.5. How do I find the version of matplotlib?
I think it is fairly recent (within last 6 months anyhow).

import matplotlib
print matplotlib.__version__

John, thanks for asking, Matthias for answering, this question, which I've always been afraid to ask... :slight_smile:

-Kaushik

···

On Wednesday 23 April 2008 12:28:11 John Reid wrote:

So I have:

In [2]: import matplotlib; print matplotlib.__version__
0.90.1

Why does pylab not have __version__?

So I guess it was fixed between 0.90.1 and 0.91.2

Thanks,
John.

Hello John,

So I have:

In [2]: import matplotlib; print matplotlib.__version__
0.90.1

Why does pylab not have __version__?

I'm not an expert, but the pylab.__doc__ states
    This is a procedural interface to the matplotlib object-oriented
    plotting library.

So I guess it was fixed between 0.90.1 and 0.91.2

I don't know. On my debian etch with matplotlib 0.90.0 also an error is
raised, but different to the one of mpl 0.91.2
(AttributeError: 'NoneType' object has no attribute 'rfind').
Maybe in between there was a time where this problem occured.
Is it possible for you to update to 0.91.2?

regards and good luck!
Matthias

···

On Wednesday 23 April 2008 15:24:30 John Reid wrote:

[sorry for so many mails]

···

On Wednesday 23 April 2008 15:54:42 Matthias Michler wrote:

Hello John,

On Wednesday 23 April 2008 15:24:30 John Reid wrote:
> So I have:
>
> In [2]: import matplotlib; print matplotlib.__version__
> 0.90.1

I just found a PC with Debian etch and matplotlib 0.90.1 and the following
error arises for me (no program exit):
    TypeError: Could not convert object to file pointer