add_econodist_legend: Helper utility to get an econodist legend into a ggplot2 plot

Description Usage Arguments See Also

View source: R/legend-helpers.R

Description

Helper utility to get an econodist legend into a ggplot2 plot

Usage

1
2
3
add_econodist_legend(gg, legend, below = "subtitle", just = c("left",
  "center", "right"), legend_height = unit(16, "points"),
  spacer = unit(10, "points"))

Arguments

gg

ggplot2 plot object to add

legend

legend grob (any grob, really)

below

which named gtable element to stick it below?

just

legend position: "left" (aligned with left veritcal axis), "center" (center of plot panel), or "right" (aligned with right vertical axis). Uses pmatch() so partial matching is supported.

legend_height

height of the legend row

spacer

height of the spacer that is put below legend?

See Also

Other Econodist legend helpers: econodist_legend_grob, left_align


hrbrmstr/ggeconodist documentation built on Nov. 4, 2019, 1:46 p.m.