How can I plot data in different colors in a 3D plot?
Mostra commenti meno recenti
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 Commenti
Adam
il 20 Set 2018
Beware that not all 'colours' that you can represent in Lab space will have a valid RGB conversion though. The gamut of Lab space is larger than that of RGB space so some conversions will result in R, G or B values out of range ( < 0 or > 1 ).
Chiara Genova
il 20 Set 2018
Adam
il 20 Set 2018
No, you have to convert to RGB to render on the screen.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Scatter Plots in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!