On May 3, 2010, at 3:16 PM, SamT wrote:


For simplicity we'll assume my code looks as follows

plot(ecdf(1:1000))

which produces a diagonal line.

Ideally, I'd like to highlight or label in a different color certain X
values (say 50,55,60,65)

Is there a function which will allow me to do this?

Yes, ecdf() which returns a function

points(c(50,55,60,65), ecdf(1:1000)( c(50,55,60,65) ), col=c("red", "green", "yellow", "blue") )

Draws colored points.

Could also use text() with same coordinates provided by a "highlightvector" and ecdf(datavector)(highlightvector).

--
David.
--
View this message in context: 
http://r.789695.n4.nabble.com/Highlight-Points-in-a-Plot-tp2124224p2124469.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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.

David Winsemius, MD
West Hartford, CT

______________________________________________
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