I would like to smooth up the edges of my graph here. Is there a way to get geom_density2d
and/or stat_density2d
to interpolate a bit differently to remove these apparent discontinuities?
I used this to create the included example:
ggplot(data = PlotModel1, aes(x = Lon, y = Lat)) +
geom_point(aes(color = Conc), shape = "") +
stat_density2d(aes(fill = ..level..), n = 100, geom="polygon", contour = TRUE) +
guides(fill = FALSE) +
theme_bw()
I would like a smoother plot like this
Thanks!