Respected R forum

I am learning R and relatively quite new to R. I am generating a scatter-plot 
as given below. (My actual table is much larger).



# Sample data frame


y = c(20, 23, 17, 31, 68)
x = c(200, 300, 400, 500, 600)

plot(x, y, type = 'l')

If I plot this scatter-plot in excel, the data values are displayed if I place 
the cursor at some desired place of the graph. E.g. if I place the cursor say 
at the point (400, 31), then the value (400, 31) is displayed.

My question is 


(A) once I plot a graph in R, is it possible to display a particular (x, y) 
co-ordinate by placing the cursor there?

(B) Suppose I have 100 pairs of (x, y ). then is it possible to display  in the 
graph (irrespective of the curosr position) the values of (x,  y) corresponding 
to say 10th, 20th, 30th, 40th etc. observations in the graph.


Regards

Katherine
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to