Erica B
2012-05-29 00:01:05 UTC
Hey All,
Apologies if this is a duplicate post, but I couldn't find an answer among existing threads.
Does anyone know how to get pcolorm to plot NaNs as grey without grey showing on the colorbar?
I'm plotting satellite data using the mapping toolbox and pcolorm. There are missing values (NaNs) in the data. What I want is for NaNs to plot as grey on the map, with only the color range of the actual data showing on the colorbar and without tacking on a grey cell at the end of the colormap. What I'm getting is NaNs being plotted as the lowest color on the colorbar.
I've investigated just patching over the map with NaNs set to grey, re-interpolating my data to the extent of the colormap/colorbar I wish to show, setting 'alphadata' etc, but so far none of these has worked the way I want it to. I also don't want to just set the NaNs to zero, as I'm plotting a percent difference map with 0% set to white, and I need to differentiate between areas of no data, and areas of no change.
Any help would be much appreciated! At this point, I've exhausted both google and my own brain.
Thanks,
EB
Apologies if this is a duplicate post, but I couldn't find an answer among existing threads.
Does anyone know how to get pcolorm to plot NaNs as grey without grey showing on the colorbar?
I'm plotting satellite data using the mapping toolbox and pcolorm. There are missing values (NaNs) in the data. What I want is for NaNs to plot as grey on the map, with only the color range of the actual data showing on the colorbar and without tacking on a grey cell at the end of the colormap. What I'm getting is NaNs being plotted as the lowest color on the colorbar.
I've investigated just patching over the map with NaNs set to grey, re-interpolating my data to the extent of the colormap/colorbar I wish to show, setting 'alphadata' etc, but so far none of these has worked the way I want it to. I also don't want to just set the NaNs to zero, as I'm plotting a percent difference map with 0% set to white, and I need to differentiate between areas of no data, and areas of no change.
Any help would be much appreciated! At this point, I've exhausted both google and my own brain.
Thanks,
EB