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 CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by