How to set background as black without appearing in colorbar?
Mostrar comentarios más antiguos
Hi, I have an image and the pixel values range from 0 to 180, represented by jet colorbar range.
However, I would like to differentiate my object in the image with its background by setting the background pixels out of the [0 180] range, such as 500, and make the pixels which have 500 value to be black.
But I do not want it to appear as part of the color bar. How can I go about doing that ??
Any form of help is much appreciated and happy holiday! :)
Respuestas (2)
Sean de Wolski
el 29 de Mzo. de 2013
Set the 'YLim' property of the colorbar to be the range you want:
surf(peaks);
h = colorbar;
set(h,'YLim',[2 5]);
Categorías
Más información sobre Color and Styling en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!