Fixed-size text that zooms/scales with a plot?
이전 댓글 표시
When I add text to a plot using the text() command, it appears at a fixed size, and doesn't change as I zoom into the figure. For example, if I draw a rectangle with text inside it, and zoom out until the rectangle is small, the text stays the same size, and thus us now huge compared to the rectangle. I'd like text that stays put inside the rectangle. I guess this is essentially "rendering" text into a plot.
Is there a way in Matlab or something in the user community that can accomplish this? I have searched and haven't found it yet.
Many thanks. Ken
채택된 답변
추가 답변 (2개)
Walter Roberson
2013년 4월 24일
0 개 추천
zoom PostAction callback, detect the current axis xlim and ylim, decide on a scaling, and set() the text FontSize appropriately (might as well only do it for the objects that are visible.)
카테고리
도움말 센터 및 File Exchange에서 Annotations에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!