How can I represent a map with different with color value
조회 수: 1 (최근 30일)
이전 댓글 표시
I have 4 array, in which first one is depth value, 2nd one is classification, and the last three columns are color value. I want to plot the classification with depth using this color value.
Z=[A B C]
A=[0.5 1 1.5 2.0 2.5 3];
B=[class1 class1 class2 class2 class1 class1]
C = [ 0.711991 0.987599 0.012401, 0.711991 0.987599 0.012401, 0.800533 0.565409 0.434591, 0.800533 0.565409 0.434591, 0.711991 0.987599 0.012401, 0.711991 0.987599 0.012401]
That means class1 will be represented by color value 0.711991 0.987599 0.012401 and class2 will represented by color value 0.800533 0.565409 0.434591. These classes want to plot with depth. Mainly, depth will be plotted against this color value which represents the various classification.
댓글 수: 0
답변 (1개)
KSSV
2019년 4월 16일
Read about plot.....it takes input (x,y) and color vector 1*3.
figure
hold on
for i = 1:10
x = rand ;
y = rand ;
col = rand(1,3) ;
plot(x,y,'.','color',col,'MarkerSize',50)
end
참고 항목
카테고리
Help Center 및 File Exchange에서 White에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!