I found a way to "hack" ggplot by combining two geom_area plots to create a normal distribution with a tail area:
library(ggplot2)
mean <- 0
standard_deviation <- 1
Zscore <- -1.35
observation = (Zscore*standard_deviation) + mean
(tail_area <- round(pnorm(observation),2))
ggplot(NULL, aes(c(-5,5))) +
geom_area(stat = "function", fun = dnorm, fill="sky blue", xlim = c(-5, -1.35)) +
geom_area(stat = "function", fun = dnorm, xlim = c(-1.35, 5))
Is there "not so hackey" approach using ggplot to create normal distributions and highlighting tail areas like above?



