Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Maintaining/Fixing/Constant Colorbar in an Animation
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
I have a system that could read the data from Arduino, and the data is passed to a Z and a 3D bar plotis display of Matlab. Although, I could set the colorbar range to 0 to 200, the color inside the colorbar keep changing when I adjust the input reading.
May I know are there any way I could fix the color of the colorbar?
b = bar3(Z,0.5);
h = colorbar;
set(h, 'ylim', [0 200]);
for k = 1:length(b)
zdata = b(k).ZData;
b(k).CData = zdata;
b(k).FaceColor = 'interp';
end
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1291490/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1291495/image.jpeg)
댓글 수: 0
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!