New backend API

I havent modified extension code before, and this change

    > would affect all the *agg backends, so I dont want to
    > commit before checking.

Here is a quick checklist of things to consider before committing Agg changes

  1) makes a plot that you can interact with

  2) passes backend_driver.py screening for Agg

  3) passes unit/memleak_hawaii3.py with no appreciable memory leak

  4) does something useful....

If it satisfies these, in my view it is suitable for public consumption.

JDH

    > I havent modified extension code before, and this change
    > would affect all the *agg backends, so I dont want to
    > commit before checking.

Here is a quick checklist of things to consider before committing Agg
changes

  1) makes a plot that you can interact with

check

  2) passes backend_driver.py screening for Agg

check

  3) passes unit/memleak_hawaii3.py with no appreciable memory leak

Average memory consumed per loop: -0.1637k bytes (? thats odd.)

  4) does something useful....

It helped me procrastinate, that's sort of useful.

If it satisfies these, in my view it is suitable for public consumption.

As of svn 2181, if you use a *Agg backend or the postscript backend with the
new API, the following script will yield a gap in the line, see attached. I
guess we need to decide if this is desireable behavior in general, I think it
is pretty useful myself.

a=arange(21, dtype='d')
a[10]=nan
plot(a, '-o')
savefig('nan_masked.png')

nan_masked.png

···

On Monday 20 March 2006 17:57, John Hunter wrote:

Darren Dale wrote:
....

As of svn 2181, if you use a *Agg backend or the postscript backend with the new API, the following script will yield a gap in the line, see attached. I guess we need to decide if this is desireable behavior in general, I think it is pretty useful myself.

Darren,

Yes, this is *very* desireable behavior. It should be in all backends. If it were, then the masked array line plotting could take advantage of it, resulting in faster and simpler code. I can't think of any possible disadvantage to this behavior.

Thanks for doing it.

Eric

Darren Dale wrote:

As of svn 2181, if you use a *Agg backend or the postscript backend with the new API, the following script will yield a gap in the line, see attached. I guess we need to decide if this is desireable behavior

+1

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...236...

This might not be related, but since when did bar charts of zero break?

bar(arange(10), zeros(10))

I have animation code, and this has been the starter code for a long
time. In the last few days this has broke though with a
ZeroDivisionError in ticker.py.

- Charlie

···

On 3/20/06, Darren Dale <dd55@...143...> wrote:

On Monday 20 March 2006 17:57, John Hunter wrote:

>
> > I havent modified extension code before, and this change
> > would affect all the *agg backends, so I dont want to
> > commit before checking.
>
> Here is a quick checklist of things to consider before committing Agg
> changes
>
> 1) makes a plot that you can interact with

check

> 2) passes backend_driver.py screening for Agg

check

> 3) passes unit/memleak_hawaii3.py with no appreciable memory leak

Average memory consumed per loop: -0.1637k bytes (? thats odd.)

> 4) does something useful....

It helped me procrastinate, that's sort of useful.

> If it satisfies these, in my view it is suitable for public consumption.

As of svn 2181, if you use a *Agg backend or the postscript backend with the
new API, the following script will yield a gap in the line, see attached. I
guess we need to decide if this is desireable behavior in general, I think it
is pretty useful myself.

a=arange(21, dtype='d')
a[10]=nan
plot(a, '-o')
savefig('nan_masked.png')