필터 지우기
필터 지우기

How to label scatter plot with different name?(not number)

조회 수: 2 (최근 30일)
Weixu Pan
Weixu Pan 2018년 2월 23일
답변: Chandani Madnani 2018년 2월 26일
I have
x=randi([50 100],1,20);
y=randi([0 60],1,20);
figure
scatter(x,y);
hold on
plot(x(1:20),y(1:20),'w.');
hold on;
for k=1:20
text(x(k),y(k),{k});
end
Picture I want generate was attached
Thanks!

답변 (1개)

Chandani Madnani
Chandani Madnani 2018년 2월 26일
Please see the following link:
https://www.mathworks.com/matlabcentral/answers/315124-how-do-i-display-custom-text-for-the-data-cursor

카테고리

Help CenterFile Exchange에서 Scatter Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!