Re: [Matplotlib-users] Gap when using contourf and nan's

2012-11-17 Thread Ian Thomas
On 16 November 2012 15:38, Bror Jonsson brorl...@gmail.com wrote: Oh, I left out a line in the code, very sorry for that. Here is a full example: import numpy as np import pylab as pl #Generate a matrix populated with 1's fld = np.ones((4,4)) #Set one corner of the matrix to NaN

Re: [Matplotlib-users] Gap when using contourf and nan's

2012-11-15 Thread Ian Thomas
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

[Matplotlib-users] Gap when using contourf and nan's

2012-11-14 Thread Bror Jonsson
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