geom_density2d(mapping = NULL, data = NULL, stat = "density2d", position = "identity", lineend = "butt", linejoin = "round", linemitre = 1, na.rm = FALSE, ...)
aes_string. Only needs to be set at the layer level if you are overriding the plot defaults.
FALSE(the default), removes missing values with a warning. If
TRUEsilently removes missing values.
layer. This can include aesthetics whose values you want to set, not map. See
layerfor more details.
Perform a 2D kernel density estimatation using kde2d and display the results with contours.
This can be useful for dealing with overplotting.
geom_density2d understands the following aesthetics (required aesthetics are in bold):
# See stat_density2d for examples