Skip to content

Instantly share code, notes, and snippets.

@cimentadaj
Created July 20, 2016 12:27
Show Gist options
  • Save cimentadaj/757cfd5a7f6287378da41a504717c904 to your computer and use it in GitHub Desktop.
Save cimentadaj/757cfd5a7f6287378da41a504717c904 to your computer and use it in GitHub Desktop.
## Two continuous variables
ggplot(data=housing, aes(x = Home.Value, y= Structure.Cost)) + geom_point()
ggplot(data=housing, aes(x = Home.Value, y= Structure.Cost)) + geom_line()
## One continuous and one categorical
ggplot(data=housing, aes(x = region, y= Home.Value)) + geom_boxplot()
## One categorical
ggplot(data=housing, aes(x = region)) + geom_bar()
## One continuous
ggplot(data=housing, aes(x = Home.Value)) + geom_histogram()
ggplot(data=housing, aes(x = Land.Value)) + geom_dotplot()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment