How can I put text on one specified bar with same size of bar and text?
显示 更早的评论
I am using the MATLAB bar3 plot. My view of the plot is from above, so I don't see the height of the bars. Because of that I colored the bars by height. The view will stay in future use the same, it won't change. I also set the plotboxaspectratiomode property to 'auto' to get rectangular bars, which I need to have. My aim is to put some text on one specified bar, wich has the same size as the bar. I use the function text from MATLAB so I can put the text on the position specified by the axis values x and y. But my problem is that the x- a and y-axis will change in future use, so also the size of the bars will change. How to implement that I create the textbox size specified by the bar size? Maybe I shouldn't use the function text?
I tried to get the bar width, but I can't get the bar width from the function bar3. I get it only from the function bar. Or I don't know how to get it.
Thank you for yor help in advance!
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Bar Plots 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!