How can i change the boarder color of CIE1931 plot? I want to change the chromaticity plot boarder color to black
    조회 수: 7 (최근 30일)
  
       이전 댓글 표시
    
figure(1);
plotChromaticity();
hold on;
clc
clear all
cd('C:\Users\RABIUL ISLAM\Desktop');
raj = xlsread("cie variation due to polarization angles.xlsx");
cie_x = raj(:,4);
cie_y = raj(:,5);
% Plot the white connecting line
plot(cie_x, cie_y, 'w-', 'LineWidth', 2);  
% Scatter plot using pentagram (5-pointed star)
h = scatter(cie_x, cie_y, 100, 'k', 'p', 'filled'); 
here is my code...I want to change the boarder colour of CIE1931 chromaticity plot to black...How can i do it?
댓글 수: 0
답변 (1개)
  Voss
      
      
 2025년 3월 22일
        figure(1);
plotChromaticity();
hold on;
To make the axes border black all around:
box on
Or, if you mean to make the surface edges black:
p = findall(gca(),'Type','surface');
p.EdgeColor = 'k';
The rest of the code with random data to show both effects:
cie_x = rand(10,1);
cie_y = rand(10,1);
% Plot the white connecting line
plot(cie_x, cie_y, 'w-', 'LineWidth', 2);  
% Scatter plot using pentagram (5-pointed star)
h = scatter(cie_x, cie_y, 100, 'k', 'p', 'filled'); 
댓글 수: 2
  Voss
      
      
 2025년 3월 22일
				
      편집: Voss
      
      
 2025년 3월 23일
  
			Here are a couple of attempts at that. Maybe the second one is good enough for this specific case.
figure();
plotChromaticity();
hold on;
p = findall(gca(),'Type','surface');
k = boundary(p.XData(:),p.YData(:));
plot(p.XData(k),p.YData(k),'k','LineWidth',2)
figure();
plotChromaticity();
hold on;
p = findall(gca(),'Type','surface');
k = convhull(p.XData(:),p.YData(:));
plot(p.XData(k),p.YData(k),'k','LineWidth',2)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





