필터 지우기
필터 지우기

How can I represent a map with different with color value

조회 수: 1 (최근 30일)
AS
AS 2019년 4월 16일
댓글: AS 2019년 4월 16일
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.

답변 (1개)

KSSV
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 CenterFile Exchange에서 Colormaps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by