powered by
This function adds horizontal and/or vertical grid lines to an existing plot. The grid lines are aligned with tick marks.
addGrid(linesPerTick = NULL, horiz = TRUE, vert = FALSE, col = "grey30", lty = 3)
Number of lines between successive tick marks (including the line on the tickmarks themselves)
Draw horizontal grid lines?
Draw vertical tick lines?
Specifies color of the grid lines
Specifies line type of grid lines. See par.
par
If linesPerTick is not specified, it is set to 5 if number of tick s is 5 or less, and it is set to 2 if number of ticks is greater than 5.
linesPerTick
# NOT RUN { plot(c(1:10), c(1:10)) addGrid(); # }
Run the code above in your browser using DataLab