Jeff, that's a good point. I remember ...
On Thu, 2009-08-27 at 07:54 -0600, Jeff Whitaker wrote:
> Christian Meesters wrote:
> >> Christian: That should work, if you created the masked array
> >> correctly. Why are you creating the mask with data=='NA'? I suspect
> >> that this always evalua
Christian Meesters wrote:
>> Christian: That should work, if you created the masked array
>> correctly. Why are you creating the mask with data=='NA'? I suspect
>> that this always evaluates to False, so you don't get a mask. You
>> probably want to check for a numeric value, not a string.
> Christian: That should work, if you created the masked array
> correctly. Why are you creating the mask with data=='NA'? I suspect
> that this always evaluates to False, so you don't get a mask. You
> probably want to check for a numeric value, not a string. For example:
Thanks a lot, Je
Christian Meesters wrote:
> Hi,
>
> I have a 2D masked array, created like:
>
> import numpy as np
> data = np.ma.array(data, mask=[data == 'NA'])
>
> which I would like to plot as a heatmap.
>
> import pylab
>
> pylab.pcolor(data)
> or
> pylab.pcolormesh(data)
>
> Well, it works with any array, bu
Hi,
I have a 2D masked array, created like:
import numpy as np
data = np.ma.array(data, mask=[data == 'NA'])
which I would like to plot as a heatmap.
import pylab
pylab.pcolor(data)
or
pylab.pcolormesh(data)
Well, it works with any array, but not if masked values are in there.
Can somebody su