|
From: Benjamin R. <ben...@ou...> - 2012-02-10 17:48:32
|
On Fri, Feb 10, 2012 at 11:23 AM, Andreas H. <li...@hi...> 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 |