dev.off()
pl <- densityplot(~eruptions, data = faithful)
print(pl)
dev.new()
p <- ggplot(faithful, aes(eruptions))
pg <- p + stat_density(geom = "path", position = "identity") + geom_point(aes(y = 0.05), position = position_jitter(height = 0.005), alpha = 0.25)
print(pg)
-
- position_jitter(height = )を変えると以下の通り
p <- ggplot(faithful, aes(eruptions))
pg <- p + stat_density(geom = "path", position = "identity") + geom_point(aes(y = 0.05), position = position_jitter(height = 0.05), alpha = 0.25)
print(pg)
- だいたいわかった。ggplot2の方が性に合うように思う