ggally_smooth: Plots the Scatter Plot with Smoothing

Description Usage Arguments Details Author(s) Examples

View source: R/gg-plots.R

Description

Add a smoothed condition mean with a given scatter plot.

Usage

1
2
3
4
5
ggally_smooth(data, mapping, ..., method = "lm", se = TRUE, shrink = TRUE)

ggally_smooth_loess(data, mapping, ...)

ggally_smooth_lm(data, mapping, ...)

Arguments

data

data set using

mapping

aesthetics being used

...

other arguments to add to geom_point

method, se

parameters supplied to geom_smooth

shrink

boolean to determine if y range is reduced to range of points or points and error ribbon

Details

Y limits are reduced to match original Y range with the goal of keeping the Y axis the same across plots.

Author(s)

Barret Schloerke [email protected]

Examples

1
2
3
4
 data(tips, package = "reshape")
 ggally_smooth(tips, mapping = ggplot2::aes(x = total_bill, y = tip))
 ggally_smooth(tips, mapping = ggplot2::aes_string(x = "total_bill", y = "tip"))
 ggally_smooth(tips, mapping = ggplot2::aes_string(x = "total_bill", y = "tip", color = "sex"))

Example output



GGally documentation built on May 18, 2018, 1:08 a.m.