Re: [Matplotlib-users] zorder taking an array

2015-06-23 Thread Jody Klymak
For my backend (nbagg), the order of the data determines the order of drawing. So in the following, the third diamond covers the first two in the first plot, but the first diamond covers them all in the second plot. Perhaps not as elegant as a matrix zorder, but can achieve the effect you

Re: [Matplotlib-users] zorder taking an array

2015-06-23 Thread Benjamin Root
I see what you are getting at. The issue is that artists are first sorted by the zorder and then drawn one at a time. The draw for a collection artist is an at-once operation, it can't (currently) be split out and interspersed with the draws from another artist. This is one of the major

Re: [Matplotlib-users] zorder taking an array

2015-06-23 Thread Benjamin Root
Right, when zorder is not explicitly specified, all the artists of the same type get the same default zorder (I think 2, but I can't remember). We then use a stable sort to determine the draw order, so two artists with the same zorder are drawn in the order that they were created (the exception

Re: [Matplotlib-users] zorder taking an array

2015-06-23 Thread Thomas Caswell
One thing you can do which may work is to partition your plots 'by hand'. It is not super elegant, but might get you the desired behavior. As long as the number of partitions is low it shouldn't hurt performance _too_ much. def z_jitter_plot(ax, x, y, partitions=10, **kwargs): labels =