Putting Annotation on Plot Area
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Nicholas
le 16 Sep 2015
Réponse apportée : Walter Roberson
le 16 Sep 2015
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 commentaires
Réponse acceptée
Walter Roberson
le 16 Sep 2015
boxsize = [.2 .2 .8 .1]; %for example
annotation('textbox', boxsize, 'String', name, 'FitBoxToText','on');
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Annotations dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!