# Draw a set of arrows
from <- cbind(
runif(10, 0.2, 0.8),
runif(10, 0.2, 0.8),
runif(10, 0.2, 0.8)
)
to <- jitter(from, amount = 0.2)
# Setup base plot
p <- plot3js(label_axes = FALSE)
# Add arrows
p <- arrows3js(
p, from, to,
arrowhead_length = 0.06,
arrowhead_width = 0.04,
lwd = 0.01
)
# View the plot
r3js(p, translation = c(0, 0, 0.15), zoom = 2)
Run the code above in your browser using DataLab