Density plot

Density plot

Density plot

Quick start

geom_density_2d

library(ggplot2)
world <- map_data("world")
ggplot(world,aes(long, lat)) +geom_density_2d(color='red') + theme_light()

den2

stat_density_2d

ggplot(world,aes(long, lat)) + stat_density_2d(aes(fill = stat(level)), geom = "polygon") + theme_map()

123

ggplot(world,aes(long, lat)) + stat_density_2d(aes(fill = stat(level),colour = region), geom = "polygon") + theme_map()+ theme(legend.position = 'none')

den4

geom_raster

ggplot(faithfuld, aes(waiting, eruptions)) +
geom_raster(aes(fill = density))+ theme_map()

den5

More

Author

Karobben

Posted on

2020-08-13

Updated on

2024-01-11

Licensed under

Comments