Let say I have below histogram
-
set.seed(1)
df <- data.frame(Type=c(rep("A",1000),rep("B",4000)),
Value=c(rnorm(1000,mean=25,sd=10),rchisq(4000,15)))
# you start here...
library(ggplot2)
ggplot(df, aes(x=Value))+
geom_histogram(aes(y=..density..,fill=Type),color="grey80")+
facet_grid(Type~.)
Now, I want to rename the facet_grid
i.e. instead of A
and B
, I want to place \sigma_1
and \sigma_2
in actual greek
alphabet (1 & 2
being suffix)
Is there any way to achieve this?
Any pointer will be highly helpful