background_color | R Documentation |
Adds color to the plot background.
background_color(object, ...)
object |
gsplot object |
... |
Further graphical parameters may also be supplied as arguments. See 'Details'. |
gs <- gsplot() %>%
points(y=c(3,1,2), x=4:6, xlim=c(0,NA),legend.name="Points") %>%
background_color(col="lightgrey") %>%
lines( c(3,4,3), c(2,4,6), legend.name="Lines", side=c(3,4)) %>%
legend(location="topleft")
gs
gs <- gsplot() %>%
points(1:100, rnorm(100,mean=10000, sd=1000), log="y") %>%
background_color(col="lightgrey")
gs
gs <- gsplot() %>%
points(1:100, rnorm(100,mean=10000, sd=1000), log="y") %>%
background_color() #yaml specifies lightgrey
gs
gs <- gsplot() %>%
points(1:100, rnorm(100,mean=10000, sd=1000), log="y") %>%
background_color("lightgoldenrod")
gs
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.