Place text on a subplot: Any way to autowrap?
이전 댓글 표시
I used the "text" command to place text onto a subplot. I have to insert line breaks manually, which I would like to avoid.
The "annotate" command seemed like a solution (https://www.mathworks.com/matlabcentral/answers/218675-is-it-possible-to-create-textbox-with-fixed-width-on-a-plot). However, the 4 position parameters are relative to the entire figure rather than the pair of axes in a subplot.
Is there something like "annotate", but for a pair of axes?
댓글 수: 5
FM
2022년 7월 15일
Adam Danz
2022년 7월 15일
You must be using regular axes (position == innerposition). With uiaxes, position==outerposition. I'm not suggesting you change to uiaxes, the problem won't change.
About the figure resize, you could also set the "resize" property of the figure to off.
I wonder if you're drawing the annotation textbox too early, before the axes have fully rendered or before you apply the long yticklabels. Does the problem happen if you wait to apply the annotation box? If you provide a minimal working example it would be easier to see what's going on.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


