Show row and column number by the side of each point in scatterplot
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
I have an array X of values has 741 (rows) and 1 (col). Y is also the same. I want to plot a scatterplot(X,Y) but I need to show row and col number by a side of each point (pair) in the scatterplot.
The formula to calculate row number = (741*2)/39 and col number = (741*2)/38
Can somebody help me with that please?
Thanks in advance.
댓글 수: 0
답변 (1개)
dpb
2014년 6월 12일
With that many points don't think you'll have anything close to enough room to show 'em all, but it's a pretty trivial exercise--
x=[1:10].';y=randi(10,10,1); % make up some data
scatter(x,y) % scatterplot it
xlim([0 11]),ylim([0 11]) % put some space around the outside points
text(x+0.1,y,num2str([x y],'[%d,%d]')) % and label the points
I don't understand your location calculation but you should be able to figure out how to put the numbers you want where you want them from the above.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Line Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!