我有两个向量代表要绘制的点(x,y)的位置。 
我知道如何绘制它们,但我也想用在图中可见的标签来标记它们1、2、3、4...。标签表示它们在向量中的顺序。 
回答:
这是执行此操作的一种方法: 
 p = rand(10,2); labels = cellstr( num2str([1:10]') ); %' # labels correspond to their order plot(p(:,1), p(:,2), 'rx') text(p(:,1), p(:,2), labels, 'VerticalAlignment','bottom', ... 'HorizontalAlignment','right') 
更多&回答...