Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Matlab xy散点中每个条目上的数据标签_Matlab - Fatal编程技术网

Matlab xy散点中每个条目上的数据标签

Matlab xy散点中每个条目上的数据标签,matlab,Matlab,我在MATLAB中有一个x-y散点图,希望在每个点上放置一个数据标签。我似乎在文档中找不到这个。可能吗?示例: p = rand(10,2); scatter(p(:,1), p(:,2), 'filled') axis([0 1 0 1]) labels = num2str((1:size(p,1))','%d'); %' text(p(:,1), p(:,2), labels, 'horizontal','left', 'vertical','bottom') 可能存在的副本,

我在MATLAB中有一个x-y散点图,希望在每个点上放置一个数据标签。我似乎在文档中找不到这个。可能吗?

示例:

p = rand(10,2);
scatter(p(:,1), p(:,2), 'filled')
axis([0 1 0 1])

labels = num2str((1:size(p,1))','%d');    %'
text(p(:,1), p(:,2), labels, 'horizontal','left', 'vertical','bottom')

可能存在的副本,