Guest User

Untitled

a guest
Jul 15th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. ggplot(faithful, aes(eruptions, waiting)) + stat_density2d(aes(colour = ..level..))
  2.  
  3. x <- sample(c('A','B','C','D'), size = 1000, replace= TRUE, prob = c(0.2,0.3,0.3,0.2))
  4. y <- rnorm(1000) * 1000
  5. df = data.frame(x= x, y = y)
  6. ggplot(data = df, aes(x = factor(x), y = ..count..))+ geom_bar(stat = 'count')
Add Comment
Please, Sign In to add comment