How to change color of colorbar's lower minimum value?
14 次查看(过去 30 天)
显示 更早的评论
How can I change the minimum value color on the color bar? I'm getting white color for the lower values.
imagesc(x,y,value)
set(gca,'YDir','normal')
myColorMap = colormap;
myColorMap(1,:) = [1 1 1];
colormap(myColorMap);
colorbar;
ma=max(value);
mi=min(value);
0 个评论
采纳的回答
Star Strider
2014-10-16
You are getting a white color for the lower values because you defined:
myColorMap(1,:) = [1 1 1];
11 个评论
Image Analyst
2014-10-17
Why does your image have nan's in it anyway? What color do you want the nan's to appear as? I think an axes control might have a background or foreground color that appears if the pixels are nan's (so they mgiht be "transparent") but I'd have to check on that. I never deal with images that have nan's. Why do you have them?
Star Strider
2014-10-17
Tunechi — My pleasure!
I A — That’s new. I didn’t know about imagesc until now. I used contourf in my example.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Colormaps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!