Label scatter data points.

2 visualizaciones (últimos 30 días)
dipak sanap
dipak sanap el 4 de Dic. de 2015
Comentada: dipak sanap el 4 de Dic. de 2015
I have a matrix C as follows;
1 3 0.454 54
3 4 0.478 0.356
7 8 4.564 1546
And I plot, scatter(C(:,3),C(:,4))
I want to label every data point as first two columns of matrix. Like, label (0.454,54) as 1 3, (0.478,0.356) as 3 4 and so on.

Respuestas (1)

Walter Roberson
Walter Roberson el 4 de Dic. de 2015
text( C(:,3),C(:,4), cellstr(str2num(C(:,1:2))) )
  3 comentarios
Walter Roberson
Walter Roberson el 4 de Dic. de 2015
Sorry, I have been up all night ;-(
text( C(:,3),C(:,4), cellstr(num2str(C(:,1:2))) )
dipak sanap
dipak sanap el 4 de Dic. de 2015
Hey thanks, it worked. And get some sleep.

Iniciar sesión para comentar.

Categorías

Más información sobre Data Distribution Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by