Effacer les filtres
Effacer les filtres

How to position added text in the graph at the upper right corner of the graph?

166 vues (au cours des 30 derniers jours)
NURUL FARINA BINTI MAZLAN
NURUL FARINA BINTI MAZLAN le 15 Mar 2019
Commenté : dpb le 6 Déc 2021
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)

Réponses (1)

dpb
dpb le 15 Mar 2019
Modifié(e) : dpb le 6 Déc 2021
xL=xlim;
yL=ylim;
text(0.99*xL(2),0.99*yL(2),str,'HorizontalAlignment','right','VerticalAlignment','top')
  2 commentaires
Gerben Erens
Gerben Erens le 6 Déc 2021
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')
dpb
dpb le 6 Déc 2021
Good catch, corrected Answer -- dpb

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by