Skip to content

Instantly share code, notes, and snippets.

@kr-shiveshwar
Last active January 7, 2017 19:14
Show Gist options
  • Save kr-shiveshwar/b24cc1bbbf8e8e5a183ad683b3628f1b to your computer and use it in GitHub Desktop.
Save kr-shiveshwar/b24cc1bbbf8e8e5a183ad683b3628f1b to your computer and use it in GitHub Desktop.
Data Visualisation1
# Histogram
library(ggplot2)
qplot(region,data = Telecom_train,geom = "bar",fill=factor(region))
qplot(region,data = Telecom_train,geom = "bar",fill=churn,position = "stack")
# flip plot by 90-degree
'adding coord_flip() will flip by 90 - degree'
qplot(region,data = Telecom_train,geom = "bar",fill=churn,position = "stack") + coord_flip()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment