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

조회 수: 6 (최근 30일)
Sachin Motwani
Sachin Motwani 2020년 8월 22일
댓글: jonas 2020년 8월 27일
How to plot all the available RGB colors' gamut plot in matlab?
(The below plot is exactly what I wish to draw)

답변 (1개)

jonas
jonas 2020년 8월 22일
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
Image Analyst
Image Analyst 2020년 8월 26일
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 2020년 8월 27일
What IA said. Alternatively you could add this:
view(3)
axis equal

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

카테고리

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

태그

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by