View source: R/utilities-background.R
setYGrid | R Documentation |
Set y grid properties of a ggplot
object
setYGrid(plotObject, color = NULL, linetype = NULL, size = NULL)
plotObject |
A |
color |
Optional character values defining the color of the grid.
See |
linetype |
Optional character values defining the linetype of the grid.
See enum |
size |
Optional numeric values defining the size of the grid. |
A ggplot
object
# Set y grid of a scatter
p <- addScatter(x = c(1, 2, 1, 2, 3), y = c(5, 0, 2, 3, 4))
setYGrid(p, color = "red", linetype = "dotted")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.