Putting Annotation on Plot Area
조회 수: 7 (최근 30일)
이전 댓글 표시
I have a plot of variables and a variable called 'name' which contains a string. I want to have a text box display the string contained in the variable named. I have the following code:
figure
plot(SR,Pcr)
title('Critical Buckling Load vs Slenderness Ratio')
xlabel('Slenderness Ratio')
ylabel('Critical Buckling Load')
annotation('textbox',sprintf(name),'FitBoxToText','on');
end
댓글 수: 0
채택된 답변
Walter Roberson
2015년 9월 16일
boxsize = [.2 .2 .8 .1]; %for example
annotation('textbox', boxsize, 'String', name, 'FitBoxToText','on');
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!