How can I automatically specify a "Best Location" property for the textbox annotation function?
Show older comments
Can I place a textbox annotation at the 'best' location of a plot instead of needing to manually specify the coordinates? I would like to do something like the following:
>> t = annotation('textbox', 'String', 'Hello', 'Location', 'best');
This results in an error because there is no Location property on the TextBox class.
The 'legend' function can use 'best' to intelligently decide where to place the graphic element on a plot. Additionally, it can specify the 'Location' to be in the cardinal directions of the plot such as 'east', 'southwest', etc. It would be great if there were similar functionality in a function which places only text on the plot.
Accepted Answer
More Answers (0)
Categories
Find more on Graphics Object Properties in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!