strange behavior using a mask with Basemap

Hi

I would expect

hgt=ma.masked_where(div == 0,hgt)

m.contourf(x,y,hgt,15,cmap=plt.cm.jet)

to produce a map complementary to the map produced by

hgt=ma.masked_where(div != 0,hgt)

m.contourf(x,y,hgt,15,cmap=plt.cm.jet)

But, this is not the case.

What am I missing?

Mathew

Yeates, Mathew C (388D) wrote:

Hi

I would expect

hgt=ma.masked_where(div == 0,hgt)

m.contourf(x,y,hgt,15,cmap=plt.cm.jet)

to produce a map complementary to the map produced by

hgt=ma.masked_where(div != 0,hgt)

m.contourf(x,y,hgt,15,cmap=plt.cm.jet)

But, this is not the case.

What am I missing?

Basemap contourf calls mpl contourf, and mpl contourf leaves a grid box empty if any of its corners is masked. Does this account for what you are seeing?

Eric