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

33 ビュー (過去 30 日間)
NURUL FARINA BINTI MAZLAN
NURUL FARINA BINTI MAZLAN 2019 年 3 月 15 日
コメント済み: dpb 2021 年 12 月 6 日
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)

回答 (1 件)

dpb
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
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')
dpb
dpb 2021 年 12 月 6 日
Good catch, corrected Answer -- dpb

サインインしてコメントする。

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by