3 8 2019

Using Plotly for data visualization

volcano is a standard data set that comes with R. It includes topographical information about a volcano in New Zealand in matrix format.

library(plotly)
data(volcano)
str(volcano)
##  num [1:87, 1:61] 100 101 102 103 104 105 105 106 107 108 ...
dim(volcano)
## [1] 87 61

Using Plotly for data visualization

We can use plotly to show it as a heatmap:

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

Using Plotly for data visualization

But we can also make a nice 3d surface plot. Neat, huh?

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