If ggplot is your thing, give it a whirl. ggplot does not support type = "b"as basic graphics. We can get around this, though with some rework and a subset:
library(ggplot2)
x <- seq(1, pi, pi/36)
y <- sin(x)
z <- data.frame(x,y)
ggplot(z, aes(x,y)) +
geom_line(data = subset(z, x > 1.5 & x < 2.5)) +
geom_point(size = 6, colour = "white") +
geom_point(size = 3, colour = "black") +
theme_bw()

Chase source
share