How to position added text in the graph at the upper right corner of the graph?
조회 수: 240 (최근 30일)
이전 댓글 표시
str(1)= sprintf(bearingType,bType);
str(2)= sprintf(bearingSpeed,current_N);
str(3)= sprintf(reliability, re);
str = {str(1),str(2),str(3)};
text(2,7,str)
댓글 수: 0
답변 (1개)
dpb
2019년 3월 15일
편집: dpb
2021년 12월 6일
xL=xlim;
yL=ylim;
text(0.99*xL(2),0.99*yL(2),str,'HorizontalAlignment','right','VerticalAlignment','top')
댓글 수: 2
Gerben Erens
2021년 12월 6일
good solution, but you have the order of arguments wrong for text. Should be
text(0.99*xL(2),0.99*yL(2),str,'HorizontalAlignment','right','VerticalAlignment','top')
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!