달력

122025  이전 다음

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

ggplot histogram

Coding/R 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()

'Coding > R' 카테고리의 다른 글

[plot] barplot with text  (0) 2017.06.13
line plot  (0) 2014.03.14
line plot  (0) 2014.01.28
ggplot2 barplot  (0) 2012.09.07
ggplot2(pie chart)  (0) 2012.09.07
Posted by jjbang
|