Skip to content
Prev 167632 / 398502 Next

plotting points with two colors

?plot.default

plot(x <- rnorm(47), type = "p", main = "plot(x, type = \"p\")", col =  
c("dark red","blue"))

If you plan to have a system for the coloring, you need to get the  
values sequence-aligned with the colors. This just colors every other  
point "blue".