top of page

#Librerías necesarias

install.packages("rgl")

install.packages("magick")

#Datos

data(iris)

head(iris)

#Codigo

library("rgl")
library("magick")
plot3d( iris$Sepal.Length, iris$Sepal.Width, iris$Petal.Length, 
        col = iris$Petal.Width, type = "s", radius = 0.1 )

#Giro Automatico

play3d( spin3d( axis = c(0, 0, 1), rpm = 7), duration = 100 )

# O Generar Gif

movie3d( spin3d( axis = c(0, 0, 1), rpm = 7),
         duration = 10, dir = getwd(),
         type = "gif", clean =  TRUE )

###################################################

install.packages("rgl")
install.packages("magick")
library("rgl")
data(iris)
head(iris)
library("magick")
plot3d( iris$Sepal.Length, iris$Sepal.Width, iris$Petal.Length, 
col = iris$Petal.Width, type = "s", radius = 0.1 )
play3d( spin3d( axis = c(0, 0, 1), rpm = 7), duration = 100 )

###################################################

”Bien! Mensaje recibido

  • b-facebook
  • Twitter Round
bottom of page