I’ve created a pcolor whose caxis ranges from -3 to 3. However, within the data I’ve got lots of points whose value are exactly 1000. What I’d like to do is keep the colouring the same for all the other points, but set the colour for any point whose value is 1000 to black. Does anyone have any ideas how I could do this..?
Thanks a lot in advance,
Adam
–EDIT–
I am currently creating the plot using a mapping tool for pcolor, m_pcolor, as follows (see here for details):
m_proj('Robinson')
h = m_pcolor(Lon', Lat', input_matrix);
m_coast('Color', 'k', 'LineWidth', 1);
set(h,'EdgeColor','none');
If black as the color for values that equal 1000 is not a strict requirement, you can simply set these values to
NaNbyThe function
pcolorwill draw thenanvalues in white.~edit~
To display the
nanvalues in black, you might change the background of the axis to black:~edit2~
If you cannot change the background, try the following work around:
This draws two surfaces above each other with the lower one set to black.