Borrar filtros
Borrar filtros

How can I represent a map with different with color value

1 visualización (últimos 30 días)
AS
AS el 16 de Abr. de 2019
Comentada: AS el 16 de Abr. de 2019
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.

Respuestas (1)

KSSV
KSSV el 16 de Abr. de 2019
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

Categorías

Más información sobre Colormaps en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by