11/1/2020

Plot mpg over wt in mtcars dataset

library(plotly)
library(ggplot2)
plot1 <- ggplot(data = mtcars, aes(x=wt, y=mpg)) +
      geom_point(aes(color = factor(am))) +
      theme_light()
ggplotly(plot1)

Plot

The end