How to plot complete 3D RGB color space (gamut) in matlab?

5 vues (au cours des 30 derniers jours)
Sachin Motwani
Sachin Motwani le 22 Août 2020
Commenté : jonas le 27 Août 2020
How to plot all the available RGB colors' gamut plot in matlab?
(The below plot is exactly what I wish to draw)

Réponses (1)

jonas
jonas le 22 Août 2020
Code adapted from this guide (link)
vert = [0 0 0;1 0 0;1 1 0;0 1 0;0 0 1;1 0 1;1 1 1;0 1 1];
fac = [1 2 6 5;2 3 7 6;3 4 8 7;4 1 5 8;1 2 3 4;5 6 7 8];
colormap(vert)
patch('Vertices',vert,'Faces',fac,...
'FaceVertexCData',vert,'FaceColor','interp')
  3 commentaires
Image Analyst
Image Analyst le 26 Août 2020
Click on the little popup rotation tool above the upper right corner of the image and then click and drag in the image to rotate the cube.
jonas
jonas le 27 Août 2020
What IA said. Alternatively you could add this:
view(3)
axis equal

Connectez-vous pour commenter.

Catégories

En savoir plus sur Colormaps dans Help Center et File Exchange

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by