Simplified legend and guide alignment for ggplot2. One-liner functions for common legend operations.

View Package Documentation

The ggguides package provides streamlined functions for managing legends in ggplot2 visualizations. It offers one-liner functions for common legend operations, reducing the boilerplate typically required for legend customization.

The package delivers five functional categories: positioning with functions like legend_left(), legend_right(), legend_top(), and legend_bottom(); direction control via legend_horizontal() and legend_vertical(); styling options for font size, family, wrapping, reversing, and reordering; tools for multiple legends including hiding, selecting, and managing guides; and multi-panel integration supporting patchwork and cowplot workflows.

Available on GitHub under MIT license.

# install.packages("devtools")
devtools::install_github("gcol33/ggguides")