How do I translate RGB color to a color on my patch Object?
조회 수: 8 (최근 30일)
이전 댓글 표시
X = [0 0 5; 0 0 5; 4 4 9];
Y = [0 4 0; 3 7 3; 0 4 0];
C = [0; .2422; 1];
figure
patch(X,Y,C);
Can anyone please help me find out how this value "0.2422" translates to its corresponding RGB value.
Matlab Documentation (" https://www.mathworks.com/help/matlab/creating_plots/how-patch-data-relates-to-a-colormap.html ") is not of much use in this directtion as well.!!
댓글 수: 0
채택된 답변
추가 답변 (1개)
Walter Roberson
2017년 6월 7일
Cdatamapping defaults to scaled. You end up about 1/4 of the way through the color map.
댓글 수: 2
Walter Roberson
2017년 6월 7일
This is a different question than what you asked. You were asking how MATLAB determined which color got plotted given a particular data value, not how to force a particular face or edge to be a particular color.
참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Object Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!