On 14 November 2012 21:05, Bror Jonsson <brorl...@gmail.com> wrote:

> Dear all,
>
> I'm trying to to show where one set of values have NaN's on the contour
> plot of another set of values. I do this by creating a mask as such:
>
> fld = randn(4,4)
> fld[:2,:2] = np.nan
> mask[mask==0] = np.nan
> contourf(arange(4),arange(4),fld)
> contourf(arange(4),arange(4),mask)
>
> The problem is that the mask patch doesn't cover the empty space in the
> fld contour. Is there any way to make this happen?
>
> My ultimate goal is something like this:
>
> fld2 = randn(4,4)
> contourf(arange(4),arange(4),fld2)
> contourf(arange(4),arange(4),mask,[1,1], extend='both',
>          colors='w', alpha=0.5)
>
> to present where fld has NaN's on the fld2 plot.
>
>
> Many thanks in advance!
>
> Bror Jonsson
>


Hello Bror,

It is not clear from your code snippets exactly what you are asking for.
Please can you post a full runnable example?

Ian Thomas
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to