plotting Y data on scatter plot

1 visualización (últimos 30 días)
Prasad Joshi
Prasad Joshi el 18 de En. de 2022
Comentada: Prasad Joshi el 18 de En. de 2022
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

Respuesta aceptada

Simon Chan
Simon Chan el 18 de En. de 2022
Another option as follows:
for i = 1:6
text(X(i),Y(i),sprintf('(%.0f)',Y(i)))
end
  1 comentario
Prasad Joshi
Prasad Joshi el 18 de En. de 2022
It works Simon Chan Thank for the help

Iniciar sesión para comentar.

Más respuestas (1)

Yusuf Suer Erdem
Yusuf Suer Erdem el 18 de En. de 2022
Before 'text()' command add 'format long' command. it should be hepful.
  1 comentario
Prasad Joshi
Prasad Joshi el 18 de En. de 2022
No Yusuf same it's showing.... Thank you by the way

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by