# Simple plot example
p <- plot3js(
x = iris$Sepal.Length,
y = iris$Sepal.Width,
z = iris$Petal.Length,
col = rainbow(3)[iris$Species],
xlab = "Sepal Length",
ylab = "Sepal Width",
zlab = "Petal Length"
)
r3js(p, zoom = 2)
# Plotting with point rollover info and highlighting
p <- plot3js(
x = USJudgeRatings$CONT,
y = USJudgeRatings$INTG,
z = USJudgeRatings$DMNR,
highlight = list(
col = "darkgreen",
size = 2.5
),
xlab = "CONT",
ylab = "INTG",
zlab = "DMNR",
size = 2,
col = "green",
label = rownames(USJudgeRatings)
)
r3js(p, zoom = 2)
Run the code above in your browser using DataLab