Could I change the color of specific point?

2 次查看(过去 30 天)
Hi, all
I have a matrix 49x49,
It's contains 0~10000 value.
When I plot this matrix, use colorbar.
But the zero value point,I want to use white color to present this point.
How can I do?
Thanks.
  3 个评论
BB
BB 2012-11-28
Other color is use "colorbar" this command
only zero value use white
Jan
Jan 2012-11-28
When you post the relevant part of your code, inserting modifications is much easier. Test data can usually created by RAND.

请先登录,再进行评论。

采纳的回答

Image Analyst
Image Analyst 2012-11-28
Get the colormap, set 0 to white, then reapply it.
cm = colormap;
cm(0, :) = [255 255 255];
colormap(cm);
  5 个评论
Image Analyst
Image Analyst 2012-11-28
That's right. The values must be in the range 0-1, not 0-255 even though it's really 255. So try this:
cm(1, :) = [1 1 1];

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Red 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by