| ggally_density {GGally} | R Documentation |
Make a scatter density plot from a given data.
ggally_density(data, mapping, ...)
data |
data set using |
mapping |
aesthetics being used |
... |
parameters sent to either stat_density2d or geom_density2d |
The aesthetic "fill" determines whether or not stat_density2d (filled) or geom_density2d (lines) is used.
Barret Schloerke schloerke@gmail.com
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))