Set background properties of a ggplot
object
Arguments
- plotObject
A
ggplot
object- fill
Optional character values defining the color of the background. See
grDevices::colors()
to get names of colors- color
Optional character values defining the color of the background frame. See
grDevices::colors()
to get names of colors- linetype
Optional character values defining the linetype of the background frame. See enum
Linetypes
to get names of linetype.- size
Optional numeric values defining the size of the background frame.
Examples
# Set background of a scatter plot
p <- addScatter(x = c(1, 2, 1, 2, 3), y = c(5, 0, 2, 3, 4))
setBackground(p, fill = "yellowgreen", color = "red", linetype = "dotted")