Show row and column number by the side of each point in scatterplot

2 visualizzazioni (ultimi 30 giorni)
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.

Risposte (1)

dpb
dpb il 12 Giu 2014
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.

Categorie

Scopri di più su Discrete Data Plots in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by