Re: [Matplotlib-users] cmap.set_bad() not showing any effect with pcolor()

2012-02-10 Thread Andreas H.
Thanks Jeff!

I really should have looked at the docs more carefully.

>> I suppose pcolor could be modified to fill the masked polygons with the
>> color indicated by cmap.set_bad - I think that's what most people would
>> expect.

Yes, I definitely second this. It would produce more expected results.

Cheers,
Andreas.

--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] cmap.set_bad() not showing any effect with pcolor()

2012-02-10 Thread Benjamin Root
On Fri, Feb 10, 2012 at 11:23 AM, Andreas H.  wrote:

> Thanks Jeff!
>
> I really should have looked at the docs more carefully.
>
> >> I suppose pcolor could be modified to fill the masked polygons with the
> >> color indicated by cmap.set_bad - I think that's what most people would
> >> expect.
>
> Yes, I definitely second this. It would produce more expected results.
>
> Cheers,
> Andreas.
>
>
IIRC, the reason for the difference between pcolor and pcolormesh is that
pcolor allows for arbitrary, non-regular domains while pcolormesh assumes
some sort of regularity.  As part of the process for creating the pcolor,
the masks for all inputs are &-ed together and the inputs are truncated
accordingly.  The reason why nothing is drawn for those polygons is that
the core part of pcolor never sees them and doesn't know they even exist.
In order to achieve the requested behavior, we would need to &-together
only the domain inputs and handle the masked Z values specially
(particularly issues surrounding how to handle drawing edges of these
polygons).

Such a change could also break code that dealt with the set_array()
(set_data()?) method of the pcolor object (this is very common for
animations).  Any change here needs to be carefully considered.

Ben Root
--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] cmap.set_bad() not showing any effect with pcolor()

2012-02-10 Thread Eric Firing
On 02/10/2012 07:23 AM, Andreas H. wrote:
> Thanks Jeff!
>
> I really should have looked at the docs more carefully.
>
>>> I suppose pcolor could be modified to fill the masked polygons with the
>>> color indicated by cmap.set_bad - I think that's what most people would
>>> expect.
>
> Yes, I definitely second this. It would produce more expected results.

I agree.  I think the reason it doesn't at present is that support for 
bad values and out-of-range values in color maps was added after the 
masked-array support was added to pcolor.

Ben is correct, though, that this change in long-standing behavior could 
break existing user code.

Eric

>
> Cheers,
> Andreas.

--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users