Skip to content

Instantly share code, notes, and snippets.

@briandk
Created August 24, 2015 17:37
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
An example plot of horsepower vs. displacement
library(dplyr)
library(ggplot2)
car_performance_data <-
mtcars %>% select(hp, disp)
horsepower_vs_displacement <-
ggplot(
aes(
x = disp,
y = hp
),
data = car_performance_data
) +
geom_point() +
geom_smooth() +
xlab(
expression(Displacement ( cm^3))
) +
ylab("Horsepower")
print(horsepower_vs_displacement)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment