How can I plot data in different colors in a 3D plot?

조회 수: 13 (최근 30일)
Chiara Genova
Chiara Genova 2018년 9월 20일
댓글: Adam 2018년 9월 20일
Hi! I am a beginner Matlab user. I have a lot of colorimetric data (L * a * b * coordinates) and I want to represent them inside the L * a * b * 3D color space. In the plot, each point must have the matching color in rgb coordinates. Attached the script for only one point to better understand the problem. P.S. The data are saved in a xls file
rgb = lab2rgb ([46.33 1.17 12.35]);
L = 46.33;
a = 1.17;
b = 12.35;
plot3(a,b,L,'o','MarkerEdgeColor',[0.4699 0.4251 0.3500],'MarkerFaceColor',[0.4699 0.4251 0.3500]);
axis ([-100 100 -100 100 -100 100]);
axis square;
grid on;
  댓글 수: 3
Chiara Genova
Chiara Genova 2018년 9월 20일
Thank you for the suggestion! Is it possible to use L*a*b* values, instead RGB, in a Matlab plot?
Adam
Adam 2018년 9월 20일
No, you have to convert to RGB to render on the screen.

댓글을 달려면 로그인하십시오.

채택된 답변

KSSV
KSSV 2018년 9월 20일
Read about scatter and scatter3
  댓글 수: 1
Chiara Genova
Chiara Genova 2018년 9월 20일
Thank you very much! Using scatter3 I think i solved the problem.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Scatter Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by