Using plotly to show the structure of a volcano

R package contains the volcano dataset which is a topographic set of information on Maunga Whau Volcano in New Zealand. You can read the descripion by ?volcano. Maunga Whau (Mt Eden) is one of about 50 volcanos in the Auckland volcanic field. This data set gives topographic information for Maunga Whau on a 10m by 10m grid.

library(plotly)

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

US population as time series data

library(datasets)
plot_ly(x=~time(uspop),y=~uspop,type="scatter",mode="line") %>% 
  layout(title= "U.S. Population in millions for the period 1790-1970", 
         xaxis = list(title = "Year"), yaxis =list(title="Population in Million people"))