其他分享
首页 > 其他分享> > scaled logy

scaled logy

作者:互联网

library(ggplot2)

set.seed(1)
vals1 <- rbeta(1000, 0.5, 0.1)
vals2 <- rbeta(1000, 0.25, 0.3)

gg <- ggplot(data.frame(x=c(vals1, vals2),
grp=c(rep("a", 1000), rep("b", 1000))))
gg <- gg + geom_density(aes(x=x, y=..scaled.., fill=grp), alpha=1/2)
gg <- gg + theme_bw()
gg

标签:vals1,gg,set,grp,rep,logy,scaled,1000
来源: https://www.cnblogs.com/3Dgenome/p/14710595.html