plotting Y data on scatter plot

3 ビュー (過去 30 日間)
Prasad Joshi
Prasad Joshi 2022 年 1 月 18 日
コメント済み: Prasad Joshi 2022 年 1 月 18 日
I am using the following command in scatter plot
uisng the following code
for i = 1:6
text(X(i),Y(i),sprintf('(%d)',Y(i)))
end
I am getting the values in E3 format ...I want only like 2500 instead of 2.5E3 easy to interpet any inputs will be highly helpful .Thank you in advance . I have used format shortG but it change for number not the plots

採用された回答

Simon Chan
Simon Chan 2022 年 1 月 18 日
Another option as follows:
for i = 1:6
text(X(i),Y(i),sprintf('(%.0f)',Y(i)))
end
  1 件のコメント
Prasad Joshi
Prasad Joshi 2022 年 1 月 18 日
It works Simon Chan Thank for the help

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

その他の回答 (1 件)

Yusuf Suer Erdem
Yusuf Suer Erdem 2022 年 1 月 18 日
Before 'text()' command add 'format long' command. it should be hepful.
  1 件のコメント
Prasad Joshi
Prasad Joshi 2022 年 1 月 18 日
No Yusuf same it's showing.... Thank you by the way

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

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by