Label scatter data points.
2 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
Walter Roberson
2015-12-4
text( C(:,3),C(:,4), cellstr(str2num(C(:,1:2))) )
3 个评论
Walter Roberson
2015-12-4
Sorry, I have been up all night ;-(
text( C(:,3),C(:,4), cellstr(num2str(C(:,1:2))) )
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Distribution Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!