From: John H. <jdh...@ac...> - 2005-11-26 03:27:00
|
>>>>> "Gerald" == Gerald John M Manipon <Ger...@jp...> writes: Gerald> Hello, I'm trying to plot some grid data using basemap and Gerald> imshow however haven't figured out how to specify the Gerald> color for nan values. For example, in my data, valid Gerald> values range from 0.0-10.0. I've assigned -9999.0 and Gerald> 1e30 to the missing values and when I imshow (setting Gerald> vmin=0.0, vmax=10.0), the missing values show up in the Gerald> low and high end of the spectrum, respectively. Is there Gerald> 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" http://article.gmane.org/gmane.comp.python.matplotlib.general/2856/match=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. JDH |