library(plotly)
## Warning: package 'plotly' was built under R version 3.5.1
## 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
p <- plot_ly(data = iris, x = ~Sepal.Length, y = ~Petal.Length, color=~iris$Species, mode='markers', type = "scatter")
p
p <- plot_ly(data = iris, x = ~Sepal.Length, y = ~Petal.Length, z = ~Petal.Width,
type = "scatter3d", color=~iris$Species, mode='markers')
p