January 28, 2018

Overview

  • Plotly creates leading open source tools
  • Its used for composing, editing, and sharing interactive data visualization via the Web.
  • The R package plotly, a high-level interface to the JavaScript library plotly.js
  • It has API libraries for Python, MATLAB, REST API etc

Let's install plotly using below command:

install.packages("plotly")

Demo : Load R packages

library(datasets)
library(plotly)
## Warning: package 'plotly' was built under R version 3.4.3
## Loading required package: ggplot2
## Warning: package 'ggplot2' was built under R version 3.4.3
## 
## 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

Demo : Volcano plot

plot_ly(z = ~volcano, type = "surface")