+.gg {GGally}R Documentation

Modify a ggpairs object by adding an ggplot2 object to all plots

Description

This operator allows you to add ggplot2 objects to a ggpairs object.

Usage

## S3 method for class 'gg'
e1 + e2

Arguments

e1

An object of class ggplot or theme

e2

A component to add to e1

Details

If the first object is an object of class ggpairs, you can add the following types of objects, and it will return a modified ggplot object.

The + operator completely replaces elements with elements from e2.

See Also

+.gg and theme

Examples

data(tips, package = "reshape")
pm <- ggpairs(tips[,2:3])
## change to black and white theme
pm + ggplot2::theme_bw()
## change to linedraw theme
# pm + ggplot2::theme_linedraw()
## change to custom theme
# pm + ggplot2::theme(panel.background = ggplot2::element_rect(fill = "lightblue"))

[Package GGally version 0.5.0 Index]