Background

Demo of the PLotly package for plotting mtcars data The plot below shows the relationship between Weight, MPG and Horsepower of cars in the dataset with Number of cylinders as the color dimension.

Slide with R Output

library(plotly)
## Loading required package: ggplot2
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout

Plot of Weight vs MPG vs HP