How can I put text on one specified bar with same size of bar and text?
Show older comments
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!
Accepted Answer
More Answers (0)
Categories
Find more on Bar Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!