25/5/2020

Slide with Code

data(mtcars)
plot_ly(mtcars,x=mtcars$wt,y=mtcars$mpg,mode='markers',type='scatter'
        ,color=as.factor(mtcars$cyl)) %>%
   layout(title="Scatter plot",
         xaxis = list(title = "Weight"),
         yaxis = list(title = "MPG"))

Slide with Plot