From: Jeremy C. <jlc...@gm...> - 2010-07-08 14:41:34
|
On Sun, Jul 4, 2010 at 8:38 PM, Benjamin Root <ben...@ou...> wrote: > Jeremy, > > The pcolor function can take a vmin and a vmax parameter if you wish to > control the colorscaling. In addition, you can use a special array > structure called a "masked array" to have pcolor ignore "special" values. > Assuming your data is 'vals': > > vals_masked = numpy.ma.masked_array(vals, vals == 0.0) > > Note that depending on your situation, doing an equality with with a > floating point value probably isn't very reliable, so be sure to test and > modify to suit your needs. 'vals_masked' can then be passed to pcolor > instead of vals. Yes, I think this is exactly what I need. Thanks! Jeremy |