Create a plot
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
x <- rnorm(100,mean=10,sd=5)
y <- rnorm(100,mean=5,sd=1)
z <- runif(100,min=10,max=50)
plot_ly(x=x,y=y,z=z,type='scatter3d',color=z)
## No scatter3d mode specifed:
## Setting the mode to markers
## Read more about this attribute -> https://plotly.com/r/reference/#scatter-mode