Hist3, height bar depends on a third variable
2 次查看(过去 30 天)
显示 更早的评论
bars height on hist3 depends on frequency of first and second variable. How can I height of those bars be related to another variable. Maybe hist3 is not the right function to achieve that.
Thanks
0 个评论
回答(1 个)
arich82
2015-12-11
x = 1:5;
y = 1:10;
[X, Y] = meshgrid(x, y);
Z = sqrt(X.^2 + Y.^2);
figure;
bar3(y, Z);
axis tight;
Does this do what you want? If not, please explain in the comments.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Bar Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!