When zooming in the axes of the app designer, my text will go out of the axes, how to aviod this?

조회 수: 2 (최근 30일)
like this. The rectangle represents the axes and the numbers represent text i added, when i zoom in the rectangle, those text will go out of the area instead of disappearing, why? What should i do to avoid this?

채택된 답변

Benjamin Kraus
Benjamin Kraus 2022년 6월 1일
편집: Benjamin Kraus 2022년 6월 1일
There is a Clipping property on text objects that is off by default. If you set the Clipping property to 'on' you will get the behavior your are expecting.
Default Behavior
ax = axes;
t = text([0.1 0.2 0.3], [0.1 0.2 0.3], ["one", "two", "three"]);
xlim([0.21 1])
With Clipping 'on'
figure
ax = axes;
t = text([0.1 0.2 0.3], [0.1 0.2 0.3], ["one", "two", "three"],'Clipping','on');
xlim([0.21 1])
  댓글 수: 4

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Object Properties에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by