Skip to contents

Render a composite legend specification

Usage

legend_render(spec, width, height)

Arguments

spec

A legend_spec() object.

width, height

Physical legend size in inches.

Value

A ggplot with a border fitted to the final content.

See also

Examples

grid <- data.frame(row = 1, col = 1, icon = "square-inset", label = "A")
spec <- legend_spec(grid, keys = c(Group = "#1090F3"))
legend_render(spec, width = 7, height = 1.5)