Two small patches

Hi All,

I've attached a patch which addresses two small issues. The first is a
bug in patches.py. When doing 3d scatter plots

xs, ys = zip(*self.xy) (line 480)

crashes, as the right hand side expands to 3 values.

The other is a speedup, normalising an entire array at once, rather
than element by element, speeding up the attached script by a factor
of 6x (and upgrading my actual application from 'too slow' to 'quite
reasonable' :slight_smile:

Cheers,

Tim

mpl.patch (935 Bytes)

3dtest.py (549 Bytes)

Thanks Tim, I just committed this. I see that my sinister plan of
releasing the 3d stuff w/o support in hopes of reeling in contributers
is starting to work....

<laughs maniacally>

路路路

On 4/9/07, Tim Leslie <tim.leslie@...149...> wrote:

The other is a speedup, normalising an entire array at once, rather
than element by element, speeding up the attached script by a factor
of 6x (and upgrading my actual application from 'too slow' to 'quite
reasonable' :slight_smile:

>
> The other is a speedup, normalising an entire array at once, rather
> than element by element, speeding up the attached script by a factor
> of 6x (and upgrading my actual application from 'too slow' to 'quite
> reasonable' :slight_smile:

Thanks Tim, I just committed this. I see that my sinister plan of
releasing the 3d stuff w/o support in hopes of reeling in contributers
is starting to work....

Well I've got a bit of work to do which involves 3D stuff in the
coming week or so, so if I run up against anything else I'll keep the
patches coming. Thanks for the quick commit.

Cheers,

Tim

路路路

On 4/10/07, John Hunter <jdh2358@...149...> wrote:

On 4/9/07, Tim Leslie <tim.leslie@...149...> wrote:

<laughs maniacally>

>
> The other is a speedup, normalising an entire array at once, rather
> than element by element, speeding up the attached script by a factor
> of 6x (and upgrading my actual application from 'too slow' to 'quite
> reasonable' :slight_smile:

Thanks Tim, I just committed this. I see that my sinister plan of
releasing the 3d stuff w/o support in hopes of reeling in contributers
is starting to work....

<laughs maniacally>

Here's another patch. This one cleans up the line2d_seg_dist function
and also speeds it up by a factor of ~2.

Cheers,

Tim

proj3d.patch (1.86 KB)

路路路

On 4/10/07, John Hunter <jdh2358@...149...> wrote:

On 4/9/07, Tim Leslie <tim.leslie@...149...> wrote:

Excellent, thanks.

Committed.

JDH

路路路

On 4/10/07, Tim Leslie <tim.leslie@...149...> wrote:

Here's another patch. This one cleans up the line2d_seg_dist function
and also speeds it up by a factor of ~2

It appears matplotlib does not have a dendrogram plot. I may be interested in developing one, if I can get a sense for what it would take. Could someone suggest some code I could look at as a model for developing a new plot?

Thanks,

--Tim