필터 지우기
필터 지우기

Putting Annotation on Plot Area

조회 수: 7 (최근 30일)
Nicholas
Nicholas 2015년 9월 16일
답변: Walter Roberson 2015년 9월 16일
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

채택된 답변

Walter Roberson
Walter Roberson 2015년 9월 16일
boxsize = [.2 .2 .8 .1]; %for example
annotation('textbox', boxsize, 'String', name, 'FitBoxToText','on');

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by