Skip to contents

Returns a ggpop_legend_strip object. When added to a ggplot with +, produces a ggpop_composite that stacks the main plot above the strip at the specified physical height. The composite works with ggplot2::ggsave() and print().

Usage

legend_strip(strip_plot, height)

Arguments

strip_plot

A ggplot to render as the bottom strip (e.g. the output of marker_legend).

height

Height of the strip in inches.

Value

A ggpop_legend_strip object; add it to a ggplot with +.

Examples

# \donttest{
# p_legend <- marker_legend(entries, ...) + key_legend(...)
# p_full   <- p_scatter + legend_strip(p_legend, height = 1.326)
# ggplot2::ggsave("out.png", p_full, width = 10.5, height = 8.826, dpi = 150)
# }