keybox {ggfun} | R Documentation |
draw border for each of the ggplot legends
keybox(p, grob = "roundrect", gp = NULL)
p |
a ggplot object |
grob |
one of 'rect' or 'roundrect' |
gp |
graphic parameter |
grob object
Guangchuang Yu
library(ggplot2)
p <- ggplot(mtcars, aes(mpg, disp, color=factor(cyl), size=cyl)) + geom_point()
keybox(p, 'roundrect', gp = gpar(col = '#808080', lty = "dashed"))