custom.ggplot | R Documentation |
Custom theme for lattice plots. Graphical parameters are passed down to 'ggplot2like()', which passes them down to 'simpleTheme()'.
custom.ggplot(...)
... |
graphical parameters passed down to 'ggplot2like()' and 'simpleTheme()' |
library(lattice)
data(mtcars)
xyplot(mpg ~ factor(carb) | gear, mtcars,
groups = carb, auto.key = list(columns = 3),
par.settings = custom.ggplot(),
panel = function(x, y, ...) {
panel.grid(h = -1, v = -1, col = "white")
panel.xyplot(x, y, ...)
panel.lmline(x, y, ...)
}
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.