How to change default values and limits within a colormap
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi, How are you?.
I want to change the default values in a colormap, In order to plot a map of "diopter powers", like in this image:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/157437/image.jpeg)
However each value is related with a value (or a range of values). For example: if a "diopter power" has a value 39 to 40, the color has to be green. (It is a standard).
Someone could help to know, how I can choose the default values to each color in the colormap.
Thanks for your help.
Rewards.
댓글 수: 0
답변 (1개)
Image Analyst
2016년 10월 27일
Looks kind of like jet upside down. Try this
imshow(grayImage, []);
myColorMap = flipud(jet(256));
% Top row black
myColorMap(end, :) = 0;
% Bottom row white
myColorMap(1, :) = 1;
colormap(myColorMap);
colorbar;
댓글 수: 2
참고 항목
카테고리
Help Center 및 File Exchange에서 Blue에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!