regression on polar plot - does not "circle" with 0.99.x

Hi all,
with the simple code here below

$ ipython -pylab

In [1]: import numpy as np

In [2]: theta = np.arange(0., 2., 1./180.)*np.pi

In [3]: plt.polar(3*theta, theta/5)

I obtain the attached images with 0.98.5.3 and 0.99.{0.1rc1} (didn't
have time to test against SVN).

AFAIUI, the 0.98.5.3 should be the correct behavior, so in 0.99.x
there's a regression.

Regards,

polar_0.99.x.png

polar_0.98.5.3.png

···

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

I filed a report at
matplotlib download | SourceForge.net.

JDH

···

On Fri, Sep 18, 2009 at 9:48 AM, Sandro Tosi <matrixhasu@...149...> wrote:

Hi all,
with the simple code here below

$ ipython -pylab

In [1]: import numpy as np

In [2]: theta = np.arange(0., 2., 1./180.)*np.pi

In [3]: plt.polar(3*theta, theta/5)

I obtain the attached images with 0.98.5.3 and 0.99.{0.1rc1} (didn't
have time to test against SVN).

AFAIUI, the 0.98.5.3 should be the correct behavior, so in 0.99.x
there's a regression.

Thanks. The subslicing optimization added in 0.99 was truncating the polar path. Subslicing has been made more "cautious" now and will only be applied when the axes are rectilinear and non-logarithmic.

Interestingly, there was already a test in the test framework for this bug, but the baseline image was wrong :slight_smile:

Mike

Sandro Tosi wrote:

···

Hi all,
with the simple code here below

$ ipython -pylab

In [1]: import numpy as np

In [2]: theta = np.arange(0., 2., 1./180.)*np.pi

In [3]: plt.polar(3*theta, theta/5)

I obtain the attached images with 0.98.5.3 and 0.99.{0.1rc1} (didn't
have time to test against SVN).

AFAIUI, the 0.98.5.3 should be the correct behavior, so in 0.99.x
there's a regression.

Regards,
  
------------------------------------------------------------------------

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

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

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; 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&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
------------------------------------------------------------------------

_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
matplotlib-devel List Signup and Options
  
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

Michael Droettboom wrote:

Thanks. The subslicing optimization added in 0.99 was truncating the
polar path. Subslicing has been made more "cautious" now and will only
be applied when the axes are rectilinear and non-logarithmic.

Interestingly, there was already a test in the test framework for this
bug, but the baseline image was wrong :slight_smile:

I see you fixed that, too -- thanks. I can't remember the history of
this one particular test -- I think maybe I inherited it without a test
image or perhaps I just over-enthusiastically copied a broken image
without realizing it as such.

These unit tests have already shown their worth I think (fixing
non-deterministic layout, getting a grip on freetype, etc.), and their
value in preventing mistakes and regressions from creeping in is hard to
perceive but I think is also very real. As more and more tests are added
(and broken baseline images and test cases are fixed), the number of
regressions will almost certainly drop.

-Andrew

Ok, next time I'll file a bug on SF issue tracker instead of writing here.

Cheers,

···

On Fri, Sep 18, 2009 at 17:16, John Hunter <jdh2358@...149...> wrote:

I filed a report at
matplotlib download | SourceForge.net.

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

Thanks for fixing this :slight_smile:

Regards,

···

On Fri, Sep 18, 2009 at 17:44, Michael Droettboom <mdroe@...31...> wrote:

Thanks. The subslicing optimization added in 0.99 was truncating the polar
path. Subslicing has been made more "cautious" now and will only be applied
when the axes are rectilinear and non-logarithmic.

Interestingly, there was already a test in the test framework for this bug,
but the baseline image was wrong :slight_smile:

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