[R] How to label specific points on a scatterplot

VictorDelgado victor.maia at fjp.mg.gov.br
Fri Jul 8 21:32:10 CEST 2011


one solution could be given by spliting your graph in two parts:

part_1 <- # take the desired four points subset #
part_2 <- # all rest points not to label

You will also need one vector with your names. I supose:

list <- c("B13", "G13", "K14", "N14")


plot(part_1$x, part_1$y)
text(part_1$x, part_1$y+.1, list)
points(part_2$x, part_2$y)

Maybe you will have to set the limits (xlim and ylim) of your graph and
chage .1 to a more precise value.
Please, take care and ensure carefully reading of command internal help
(typing ?text, for example), the R's help-pages are very clear and didactic. 

Be sure also, searching for previous questions already made in "r-help",
preventing double questions on basic isues, and be more specific possible
about your problem. If your data is from base, I could give you one better

Take care, Have a god job!

Victor Delgado
cedeplar.ufmg.br P.H.D. student
www.fjp.mg.gov.br reseacher

View this message in context: http://r.789695.n4.nabble.com/How-to-label-specific-points-on-a-scatterplot-tp3654697p3654978.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list