- You can use xticklabels to add labels to the bar plot at points defined in xticks.
Problems with positioning of data labels in a stacked bar chart created by Matlab App
2 次查看(过去 30 天)
显示 更早的评论
I created a Matlab app to draw bar chart. The plot works fine. But, I am experiencing 2 problems:
1) It seems that I can not freely put the data labels where I want in the graph
2) I do not know how to te show/create the legend
Could anyone please advise me?
0 个评论
回答(1 个)
Ajay Pattassery
2020-7-23
bar([2 3 4])
xticklabels({'first','second','third'})
legend('data')
0 个评论
另请参阅
类别
在 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!