ggally_density: Plots the Scatter Density Plot

Description Usage Arguments Details Author(s) Examples

View source: R/gg-plots.R

Description

Make a scatter density plot from a given data.

Usage

1
ggally_density(data, mapping, ...)

Arguments

data

data set using

mapping

aesthetics being used

...

parameters sent to either stat_density2d or geom_density2d

Details

The aesthetic "fill" determines whether or not stat_density2d (filled) or geom_density2d (lines) is used.

Author(s)

Barret Schloerke schloerke@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 data(tips, package = "reshape")
 ggally_density(tips, mapping = ggplot2::aes(x = total_bill, y = tip))
 ggally_density(tips, mapping = ggplot2::aes_string(x = "total_bill", y = "tip"))
 ggally_density(
   tips,
   mapping = ggplot2::aes_string(x = "total_bill", y = "tip", fill = "..level..")
 )
 ggally_density(
   tips,
   mapping = ggplot2::aes_string(x = "total_bill", y = "tip", fill = "..level..")
 ) + ggplot2::scale_fill_gradient(breaks = c(0.05, 0.1, 0.15, 0.2))

GGally documentation built on May 20, 2017, 2:14 a.m.

Search within the GGally package
Search all R packages, documentation and source code