How can I put shapes (as circles, and arrows) and (multi-rows) texts outside a Matlab plot?
7 views (last 30 days)
Show older comments
How can I put shapes (as circles, and arrows) and (multi-rows) texts outside a Matlab plot, as in the following picture?
Indeed, I would like to reproduce (something very similar to) the following picture. Any suggestions? Would it be feasible with Matlab?
0 Comments
Accepted Answer
Walter Roberson
on 29 May 2023
However note that annotation() cannot use data coordinates, so it can be messy to place items correctly in the case where the area might be resized.
There are some File Exchange contributions to assist with placing annotations in data units.
The more advanced technique is to set the Clipping property of the axes to 'off'; when you do that then anything drawn within the OuterPosition of the axes will show up (normally only things in the InnerPosition show up.) You might need to specifically manipulate InnerPosition as much smaller than typical relative to OuterPosition and you might need to change the PositionConstraint property (which I believe had a different name in the past.)
1 Comment
More Answers (1)
See Also
Categories
Find more on Graphics Object Programming 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!