Interpreting 2 dimensional kernel density estimates ggplot

Viewed 27

I have created several 2-dimensional kernel density estimates using ggplot. I have been using the following code:

m <- ggplot(EMOD29, aes(x=GPP, y=ER, shape=Model)) +
geom_point(aes(shape=Model, color=Model), size=3.5)+
scale_shape_manual(values=c(3,16)) +
scale_color_manual(values=c("Black","Black"))+
theme(legend.title = element_blank(),legend.text = element_text(size=15, "Times New 
Roman"), legend.position = "right", aspect.ratio = 1)+
xlim(0, 25) +
ylim(-10,5)+
guides(color = guide_legend(override.aes = list(size = 1)))

KDE.plot.m<- m + stat_density_2d(geom = "polygon", contour = TRUE,
              aes(fill = after_stat(level)), colour="transparent",
              bins = 30)+
geom_point() +
scale_fill_distiller(palette = "Blues", direction = 1) +
theme(text=element_text(family="Times New Roman", size=18),
    panel.grid = element_blank(),
    panel.background = element_blank(),
    axis.line = element_line(),
    legend.position = "right")

KDE.plot.m

The code successfully creates a plot, however, I cannot find any clear answer as to what levels actually mean. Are they related to probability? How should this be interpreted?

enter image description here

0 Answers
Related