using bar3(z) to plot in unusual data visualization
    조회 수: 3 (최근 30일)
  
       이전 댓글 표시
    
채택된 답변
  Voss
      
      
 2024년 5월 10일
        
      편집: Voss
      
      
 2024년 5월 10일
  
      red_data   = [ 5  5 20 35 15];
blue_data  = [30 25 20 15  5];
green_data = [30 25 35  5  5];
Nr = numel(red_data);
Nb = numel(blue_data);
Ng = numel(green_data);
data = NaN(Nb+1,Nr+Ng+1);
data(1,1:Nr)     = red_data;
data(2:end,Nr+1) = blue_data;
data(1,Nr+2:end) = green_data;
h = bar3(data);
for ii = [1:Nr Nr+2:Nr+Ng+1]
    h(ii).ZData(6:end,:) = NaN;
end
h(Nr+1).ZData(1:5,:) = NaN;
set(h(1:Nr),'FaceColor','r')
set(h(Nr+1),'FaceColor','b')
set(h(Nr+2:end),'FaceColor','g')
댓글 수: 7
추가 답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!








