keybox: keybox

View source: R/keybox.R

keyboxR Documentation

keybox

Description

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

Value

grob object

Author(s)

Guangchuang Yu

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"))

ggfun documentation built on Oct. 30, 2024, 9:13 a.m.