Guest User

Untitled

a guest
Jun 22nd, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. require(ggplot2)
  2.  
  3. data("Titanic")
  4. titanic <- as.data.frame(Titanic)
  5.  
  6. ggplot(titanic, aes(x = Sex, fill = Survived)) +
  7. theme_bw() + facet_wrap(~ Class) + geom_bar() +
  8. labs(y = "Passenger Count", title = "Titanic Survival Rates by Pclass and Sex")
Add Comment
Please, Sign In to add comment