Hello, I'm trying to plot some grid data using basemap and
> imshow however haven't figured out how to specify the
> color for nan values. For example, in my data, valid
> values range from 0.0-10.0. I've assigned -9999.0 and
> 1e30 to the missing values and when I imshow (setting
> vmin=0.0, vmax=10.0), the missing values show up in the
> low and high end of the spectrum, respectively. Is there
> a way to do this?
See the archives for a post by Danny Shevitz and followups in the
thread "obscure colormapping issue related to quantization"
Basically, you want to write a custom normalization and colormapping
instance, and recipe code is posted in the thread linked above.