problem plotting log (works with 0.98.5.3)

Hello,
with 0.99.{0, 1rc1} I have problem with this code:

In [1]: import matplotlib.pyplot as plt

In [2]: import numpy as np

In [3]: x = np.arange(0., np.e, 0.01)

In [4]: y = np.log(x)

In [5]: print y[:2], y[-2:]
[ -Inf -4.60517019] [ 0.99325177 0.99694863]

In [6]: plt.plot(x, y);

In [7]: plt.show()

that generates the image attached, that's clearly wrong :slight_smile:

I works fine with 0.98.5.3, so there's something in the 0.99.* that broke.

Regards,

log_graph.png

路路路

--
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

Yes -- a bug was introduced where non-finite values were no longer being ignored by the data extents finder. This has now been fixed on the 0.99.x branch (r7774) and the trunk.

Mike

Sandro Tosi wrote:

路路路

Hello,
with 0.99.{0, 1rc1} I have problem with this code:

In [1]: import matplotlib.pyplot as plt

In [2]: import numpy as np

In [3]: x = np.arange(0., np.e, 0.01)

In [4]: y = np.log(x)

In [5]: print y[:2], y[-2:]
[ -Inf -4.60517019] [ 0.99325177 0.99694863]

In [6]: plt.plot(x, y);

In [7]: plt.show()

that generates the image attached, that's clearly wrong :slight_smile:

I works fine with 0.98.5.3, so there's something in the 0.99.* that broke.

Regards,
聽聽
------------------------------------------------------------------------

------------------------------------------------------------------------

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
------------------------------------------------------------------------

_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
聽聽
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

Michael Droettboom wrote:

Yes -- a bug was introduced where non-finite values were no longer being
ignored by the data extents finder. This has now been fixed on the
0.99.x branch (r7774) and the trunk.
聽聽

Hi Mike,

This would seem like something useful to write a test for to make sure
these regressions don't slip in in the future. Would it be easy to write
a test (image based or non image based)? If so, would you mind doing it
and checking it into the trunk? You can look at
lib/matplotlib/tests/test_axes.py and lib/matplotlib/tests/test_basic.py
for examples.

Also, apologies about the buildbot master being down last night and this
morning. It's back online now.

-Andrew

Good point. A test based on Sandro's example has been committed to SVN.

Mike

Andrew Straw wrote:

路路路

Michael Droettboom wrote:
聽聽

Yes -- a bug was introduced where non-finite values were no longer being ignored by the data extents finder. This has now been fixed on the 0.99.x branch (r7774) and the trunk.
聽聽

Hi Mike,

This would seem like something useful to write a test for to make sure
these regressions don't slip in in the future. Would it be easy to write
a test (image based or non image based)? If so, would you mind doing it
and checking it into the trunk? You can look at
lib/matplotlib/tests/test_axes.py and lib/matplotlib/tests/test_basic.py
for examples.

Also, apologies about the buildbot master being down last night and this
morning. It's back online now.

-Andrew
聽聽
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA