addGrid | R Documentation |
Adds grid lines to a graph.
addGrid(current, Xgrid = list(grid = "gray50", finegrid = "none"), Ygrid = list(grid = "gray50", finegrid = "none"))
current |
the current plot information. Typically, this would be the
output from one of the graph creation functions like |
Xgrid |
parameters defining the characteristics of the x-axis grid
lines. The components refer to the color to draw the |
Ygrid |
parameters defining the characteristics of the y-axis grid
lines. The components refer to the color to draw the |
Information about grid lines is contained in the information returned from high-level plotting functions in the smwrGraphs package.
NULL is returned invisibly.
The function addGrid
should be used after
setting up a graph with one of the main plotting functions in the smwrGraphs
package and setting the what
component in the Plot
argument to
"none." The graph can be completed by using addXY
.
xyPlot
, timePlot
, addXY
## Not run: set.seed(1) X <- rnorm(32) Y <- X + rnorm(32) setGD() AA.pl <- xyPlot(X, Y, Plot=list(what="none")) # Grid first, then data to avoid over plotting addGrid(AA.pl) addXY(X, Y, Plot=list(what="points")) # For more details of addGrid see vignette(topic="GraphAdditions", package="smwrGraphs") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.