top of page

#Librerías necesarias

install.packages("rgl")

install.packages("plot3Drgl")

install.packages("magick")

library("magick")

library("rgl")

library("plot3Drgl")

#Codigo

require(plot3D)

with(USArrests, text3D(Murder, Assault, Rape, 
                       colvar = UrbanPop, col = gg.col(100), theta = 60, phi = 20,
                       xlab = "Asesinos", ylab = "Ladrones", zlab = "Violadores", 
                       main = "ARRESTOS EN USA", 
                       labels = rownames(USArrests), cex = 0.6, 
                       bty = "g", ticktype = "detailed", d = 2,
                       clab = c("Urban","Pop"), adj = 0.5, font = 2))

with(USArrests, scatter3D(Murder, Assault, Rape - 1, 
                          colvar = UrbanPop, col = gg.col(100), 
                          type = "h", pch = ".", add = TRUE))


require(plot3Drgl)
plotrgl (lighting = TRUE, smooth = FALSE)
 

#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("plot3Drgl")

install.packages("magick")

library("magick")

library("rgl")

library("plot3Drgl")

require(plot3D)

with(USArrests, text3D(Murder, Assault, Rape, 
                       colvar = UrbanPop, col = gg.col(100), theta = 60, phi = 20,
                       xlab = "Asesinos", ylab = "Ladrones", zlab = "Violadores", 
                       main = "ARRESTOS EN USA", 
                       labels = rownames(USArrests), cex = 0.6, 
                       bty = "g", ticktype = "detailed", d = 2,
                       clab = c("Urban","Pop"), adj = 0.5, font = 2))

with(USArrests, scatter3D(Murder, Assault, Rape - 1, 
                          colvar = UrbanPop, col = gg.col(100), 
                          type = "h", pch = ".", add = TRUE))


require(plot3Drgl)
plotrgl (lighting = TRUE, smooth = FALSE)

 


plotrgl (lighting = TRUE, smooth = FALSE)

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

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

”Bien! Mensaje recibido

  • b-facebook
  • Twitter Round
bottom of page