create figure with multiple bars
1 次查看(过去 30 天)
显示 更早的评论
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/213706/image.png)
I need code represent same this figure.
thanks in advance!
0 个评论
采纳的回答
Walter Roberson
2019-4-14
bar() with 'stacked' option or 'Horizontal'. text() the labels you want into place. "hold on" and bar() again for the JAMA entry; you might need to use the 'baseline' property for it. It might be easier to just use fill() to draw the JAMA box.
2 个评论
Walter Roberson
2019-4-14
编辑:Walter Roberson
2019-4-14
vals = [46.535 42.967 31.798 29.526 31.086 32.626 40.899 66.560 158.890 548.002];
bar(vals, 'horizontal', true, 'barwidth', 1);
yticklabels({'2048', '1024', '512', '256', '128', '64', '32', '16', '1:8', '1:4', ''})
更多回答(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!