How can i plot this pic by matlab ??
    1 view (last 30 days)
  
       Show older comments
    
Answers (1)
  DGM
      
      
 on 6 Apr 2025
        It looks like an upside-down representation of HSV with some random unknown extra line.  I'm going to ignore it, since it looks like a mistake.
% vertex colors
CT0 = [0 0 0; % k
    1 1 1; % w
    hsv(6)]; % rygcbm
% vertex locations
a = 0.5;
b = sqrt(3)/2;
V = [0 0 1; % k
    0 0 0; % w
    1 0 0; % r
    a b 0; % y
    -a b 0; % g
    -1 0 0; % c
    -a -b 0; % b
    a -b 0]; % m
% face list
ps = (3:8).';
F = [2*ones(6,1) circshift(ps,-1) ps;
    ones(6,1) ps circshift(ps,-1)];
% plot it all
patch('faces',F,'vertices',V, ...
    'facevertexcdata',CT0,'facecolor','interp');
view(-62,-22)
axis equal; grid on
xlabel('X'); ylabel('Y'); zlabel('Z')
ylim([-1 1])
0 Comments
See Also
Categories
				Find more on Surface and Mesh Plots in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


