Re: [matplotlib-devel] imshow zorder (patch for review)

2009-11-12 Thread Andrew Straw
> > On Wed, Nov 11, 2009 at 7:12 PM, Andrew Straw wrote: > >> > I had a patch waiting in the wings for that, but I wanted to see the dust >> > settle before committing it. I think the dust is officially settled, so >> > please commit yours or else I'll commit mine. >> > >> > > Please go ah

Re: [matplotlib-devel] imshow zorder (patch for review)

2009-11-12 Thread Jae-Joon Lee
On Thu, Nov 12, 2009 at 3:45 PM, Jae-Joon Lee wrote: > By the way, I just encountered some zorder issue with the new patch. > The thing is, zorder=1 for Images seems to high. > For example, patches also have zorders=1. So, if I draw an image, and > add some patches (which I often do to indicate re

Re: [matplotlib-devel] imshow zorder (patch for review)

2009-11-12 Thread Jae-Joon Lee
On Wed, Nov 11, 2009 at 7:12 PM, Andrew Straw wrote: > I had a patch waiting in the wings for that, but I wanted to see the dust > settle before committing it. I think the dust is officially settled, so > please commit yours or else I'll commit mine. > Please go ahead. By the way, I just encount

Re: [matplotlib-devel] imshow zorder (patch for review)

2009-11-11 Thread Andrew Straw
Jae-Joon Lee wrote: > I also committed a small patch that makes zorders respected among > images (not with other artists) for noncomposit backends. > That looks fine to me. Thanks. > Anyhow, can we get rid of the second items in the "dsu" list? My guess > is that this is to make the sort stable,

Re: [matplotlib-devel] imshow zorder (patch for review)

2009-11-11 Thread Jae-Joon Lee
I also committed a small patch that makes zorders respected among images (not with other artists) for noncomposit backends. Anyhow, can we get rid of the second items in the "dsu" list? My guess is that this is to make the sort stable, but python sort is already stable, isn't it? -JJ On Tue, Nov

Re: [matplotlib-devel] imshow zorder (patch for review)

2009-11-10 Thread Andrew Straw
Andrew Straw wrote: > John Hunter wrote: > >> On Mon, Nov 9, 2009 at 10:21 AM, Andrew Straw wrote: >> >> >>> Hi All, >>> >>> I have addressed what I think is a long-standing wart: zorder is mostly >>> ignored for imshow(). (See e.g. >>> http://old.nabble.com/Re%3A--Matplotlib-users--ims

Re: [matplotlib-devel] imshow zorder (patch for review)

2009-11-09 Thread Jae-Joon Lee
On Mon, Nov 9, 2009 at 3:55 PM, Andrew Straw wrote: > What's the motivation of the ps backend "compositing" (rasterizing to a > single bitmap) multiple images? It seems it will, by design, preclude the > use of non-image artists between two images. I guess the motivation is to > reduce output file

Re: [matplotlib-devel] imshow zorder (patch for review)

2009-11-09 Thread Andrew Straw
Jae-Joon Lee wrote: > On Mon, Nov 9, 2009 at 12:44 PM, Eric Firing wrote: > >> PS backend already does things differently from others because it doesn't >> handle alpha, correct? Does the patch make this situation any worse? >> >> > > When there are multiple Images and render.option_image

Re: [matplotlib-devel] imshow zorder (patch for review)

2009-11-09 Thread Jae-Joon Lee
On Mon, Nov 9, 2009 at 12:44 PM, Eric Firing wrote: > PS backend already does things differently from others because it doesn't > handle alpha, correct?  Does the patch make this situation any worse? > When there are multiple Images and render.option_image_nocomposite() is false (as in the ps bac

Re: [matplotlib-devel] imshow zorder (patch for review)

2009-11-09 Thread John Hunter
On Mon, Nov 9, 2009 at 12:16 PM, Andrew Straw wrote: > So now the question for me is what is this option_image_nocomposite is so > that I can generalize the patch to both when it's True and False. From the The compositing is in support of things like pylab_examples/layer_images.py, where two ima

Re: [matplotlib-devel] imshow zorder (patch for review)

2009-11-09 Thread John Hunter
On Mon, Nov 9, 2009 at 12:12 PM, Jae-Joon Lee wrote: > On Mon, Nov 9, 2009 at 1:01 PM, John Hunter wrote: >> Your >> patch is only applied when len(images)<=1 or >> renderer.option_image_nocomposite(), both of which will be False when >> using Agg with multiple images, no? > > I believe renderer.

Re: [matplotlib-devel] imshow zorder (patch for review)

2009-11-09 Thread Andrew Straw
John Hunter wrote: > On Mon, Nov 9, 2009 at 10:21 AM, Andrew Straw wrote: > >> Hi All, >> >> I have addressed what I think is a long-standing wart: zorder is mostly >> ignored for imshow(). (See e.g. >> http://old.nabble.com/Re%3A--Matplotlib-users--imshow-zorder-tt19047314.html#a19047314 >> )

Re: [matplotlib-devel] imshow zorder (patch for review)

2009-11-09 Thread Jae-Joon Lee
On Mon, Nov 9, 2009 at 1:01 PM, John Hunter wrote: > Your > patch is only applied when len(images)<=1 or > renderer.option_image_nocomposite(), both of which will be False when > using Agg with multiple images, no? I believe renderer.option_image_nocomposite() is True for the agg backend. So, it

Re: [matplotlib-devel] imshow zorder (patch for review)

2009-11-09 Thread John Hunter
On Mon, Nov 9, 2009 at 10:21 AM, Andrew Straw wrote: > Hi All, > > I have addressed what I think is a long-standing wart: zorder is mostly > ignored for imshow(). (See e.g. > http://old.nabble.com/Re%3A--Matplotlib-users--imshow-zorder-tt19047314.html#a19047314 > ) The question is whether I should

Re: [matplotlib-devel] imshow zorder (patch for review)

2009-11-09 Thread Eric Firing
Jae-Joon Lee wrote: > Andrew, > > One of my worry is that this can results in inconsistent ouputs > between backends. Your patch only affects backends with compositing > capabilities. And backends such as ps backend will still render images > at the bottom of all other artists. PS backend already

Re: [matplotlib-devel] imshow zorder (patch for review)

2009-11-09 Thread Jae-Joon Lee
Andrew, One of my worry is that this can results in inconsistent ouputs between backends. Your patch only affects backends with compositing capabilities. And backends such as ps backend will still render images at the bottom of all other artists. I think it is often sufficient if we draw images a

Re: [matplotlib-devel] imshow zorder (patch for review)

2009-11-09 Thread Eric Firing
Andrew Straw wrote: > Hi All, > > I have addressed what I think is a long-standing wart: zorder is mostly > ignored for imshow(). (See e.g. > http://old.nabble.com/Re%3A--Matplotlib-users--imshow-zorder-tt19047314.html#a19047314 > > ) The question is whether I should apply the attached patch.

Re: [matplotlib-devel] imshow zorder (patch for review)

2009-11-09 Thread Gael Varoquaux
On Mon, Nov 09, 2009 at 08:21:30AM -0800, Andrew Straw wrote: > Hi All, > > I have addressed what I think is a long-standing wart: zorder is mostly > ignored for imshow(). (See e.g. > http://old.nabble.com/Re%3A--Matplotlib-users--imshow-zorder-tt19047314.html#a19047314 > > ) The question is

[matplotlib-devel] imshow zorder (patch for review)

2009-11-09 Thread Andrew Straw
Hi All, I have addressed what I think is a long-standing wart: zorder is mostly ignored for imshow(). (See e.g. http://old.nabble.com/Re%3A--Matplotlib-users--imshow-zorder-tt19047314.html#a19047314 ) The question is whether I should apply the attached patch. The worry is that someone is rel