Skip to contents

Apply legend visibility and position to a ggplot

Usage

.apply_legend(p, show_legend, legend_position)

Arguments

p

A ggplot object.

show_legend

Logical. FALSE hides the legend.

legend_position

Legend position passed to theme().

Value

The modified ggplot object.