Coding/R
ggplot histogram
jjbang
2012. 9. 19. 19:19
data
44458
43268
42549
40440
37718
34968
34779
34592
32402
31347
31285
31165
31046
31046
29434
29286
28128
b = log2(a)
p = ggplot(a, aes(x = b))
p = p + geom_histogram(aes(y = ..density..), binwidth = 1,colour="black", fill="white")
p= p + geom_density(colour="blue")
p = p + xlab("term frequency in test(log2)")
p = p + opts(title = "term frequency distribution in sample dataset", legend.title=theme_blank())
p
p = ggplot(a, aes(x = b))
p = p + geom_histogram(aes(y = ..density..), binwidth = 1,colour="black", fill="white")
p= p + geom_density()