ANNOTATEAXES: Annotation object in axes data coordinate
ANNOTATEAXES wraps the built-in ANNOTATION function to create an ANNOTATION object with its position (i.e., POSITION or X/Y properties) values to be specified in the axes data coordinate. ANNOTATEAXES sets up property listeners so that any modification to the annotation object position will be made in the axes data coordinate (although its current position is shown in the normalized figure coordinate). Also, changing the Position, XLim, or YLim properties of the associated axes (and its parent uipanels) will automatically trigger the adjustment of the annotation object location so it maintains proper position with respect to the axes. The annotation object is automatically deleted when its axes is deleted.
ANNOTATEAXES supports all ANNOTATION object types and takes the same arguments as the ANNOTATION function (except for specifying axes instead of axes).
Examples:
rh=annotateaxes('rectangle',[.1 .1 .3 .3]);
ah=annotateaxes('arrow',[.9 .5],[.9,.5],'Color','r');
th=annotateaxes('textarrow',[.3,.6],[.7,.4],'String','ABC');
Cite As
Kesh Ikuma (2024). ANNOTATEAXES: Annotation object in axes data coordinate (https://www.mathworks.com/matlabcentral/fileexchange/45240-annotateaxes-annotation-object-in-axes-data-coordinate), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Graphics > Graphics Objects > Graphics Object Properties >
- MATLAB > Graphics > Graphics Objects > Graphics Object Programming >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.