| grid {base} | R Documentation |
Add Grid to a Plot
Description
grid adds an nx by ny rectangular grid to an
existing plot, using lines of type lty and color col.
Usage
grid(nx = 3, ny = 3, col = "lightgray", lty = "dotted")
See Also
plot, lines, points.
Examples
data(iris)
plot(iris$Sepal.L, iris$Sepal.W, col = rep(1:3, rep(50, 3)),
xlim = c(4, 8), ylim = c(2, 4.5))
grid(4, 5, lty = "solid")