I am trying to plot a 2D array which contains some NaN values as a map. I
would like to be able to control the colours assigned to these data points.
At the moment it seems that there are given the same colour as the highest
value in the array. Any suggestions would be appreciated. Although not using
the basemap I think this example highlights my issue
import numpy as np
import matplotlib.pyplot as plt
a = np.array([[1,2,3,np.nan,5],[4,22,np.nan,11,9]])
as you can hopefully see the NaNs are given the same colours as the highest
values in the array. Ideally I would like to give these the colour white,
regardless of what colourmap is later applied with basemap.
View this message in context: http://www.nabble.com/Controlling-colours-for-NaN-values-with-basemap-tp25609596p25609596.html
Sent from the matplotlib - users mailing list archive at Nabble.com.