You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
p <- ggplot(faithful, aes(x = eruptions, y = waiting)) +
# add a layer with the points
geom_point() +
# and a layer for the density heatmap with the alpha and the color determined by density (the .. refers to the fact that density is a variable that was created inside the ggplot() function)
stat_density2d(aes(alpha=..density.., fill=..density..), geom="tile", contour=FALSE); p