How can I make a 3D bar chart for a 1044X22 array which is colored with height?
3 次查看(过去 30 天)
显示 更早的评论
When I do bar3(Data) for a 1044X21 array, I get this figure (pfa the data)

But I want to make a figure like this showing the colored bars clearly

4 个评论
KSSV
2022-6-15
bar3(Data)
ylim(500 560])
As the data is very fine, you cannot see colors..you need to zoom.
采纳的回答
Star Strider
2022-6-15
I am not certain how clearly that sort of matrix can be defined
Try this —
Data = rand(1044,22);
figure
b = bar3(Data);
colorbar
axis square
for k = 1:length(b)
b(k).EdgeColor = 'none';
zdata = b(k).ZData;
b(k).CData = zdata;
b(k).FaceColor = 'interp';
end
.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
