Interactive Visualization

Bamidele Tella

29/12/2020

Overview

These presentation is a slide visualization of the mtcars data done with plotly. The visualization is done in 3D scatter plot showing the miles per Gallon in relation with the weight, horsepower and number of cylinders of the car.

Visualization

library(plotly)
plot_ly(mtcars, x=~mpg,y=~wt,z=~hp, type = "scatter3d",
        mode="markers", hoverinfo = 'text',
        text = ~paste('</br> Car Name: ', rownames(mtcars),
                      '</br> MPG: ', mpg,
                      '</br> Wt: ', wt),
        color=~cyl) %>% add_text(text=rownames(mtcars),textposition="bottom")

Thank You