How can I put shapes (as circles, and arrows) and (multi-rows) texts outside a Matlab plot?
5 Ansichten (letzte 30 Tage)
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?
Walter Roberson am 29 Mai 2023
The formal method is to use annotation
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.)