using contourf to plot masked array

Hi,

  I tried to use contourf to plot an array in which the land values have been masked. However, I found that contourf did not deal with the masking properly. I would expect the masked region to be bounded by the separation line of land and sea, but it actually exceeds that line. I also tried with pcolor and this time the masking is handled correctly. Could anybody tell me what is the right way to use contourf for plotting masked arrays? Thanks!

Zhaoru

Hi,

   I tried to use contourf to plot an array in which the land values have been masked. However, I found that contourf did not deal with the masking properly. I would expect the masked region to be bounded by the separation line of land and sea, but it actually exceeds that line. I also tried with pcolor and this time the masking is handled correctly. Could anybody tell me what is the right way to use contourf for plotting masked arrays? Thanks!

What mpl version are you using? For a long time there was a deep-seated bug in handling masked regions, but about a year ago Ian Thomas fixed it.

Eric

···

On 02/21/2011 07:27 PM, Zhaoru Zhang wrote:

Zhaoru
------------------------------------------------------------------------------
Index, Search& Analyze Logs and other IT data in Real-Time with Splunk
Collect, index and harness all the fast moving IT data generated by your
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights.
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users