draw border for each of the ggplot legends
Usage
keybox(p, grob = "roundrect", gp = NULL)
Arguments
- p
a ggplot object
- grob
one of 'rect' or 'roundrect'
- gp
graphic parameter
Examples
library(ggplot2)
p <- ggplot(mtcars, aes(mpg, disp, color=factor(cyl), size=cyl)) + geom_point()
keybox(p, 'roundrect', gp = gpar(col = '#808080', lty = "dashed"))
#> Warning: This function is deprecated, please refer to 'element_roundrect'.