Learn R Programming

r3js (version 0.0.2)

box3js: Add a box to an r3js plot

Description

Add a box to an r3js plot

Usage

box3js(
  data3js,
  sides = c("x", "y", "z"),
  dynamic = TRUE,
  col = "grey80",
  geometry = FALSE,
  renderOrder = 1,
  ...
)

Value

Returns an updated data3js object

Arguments

data3js

The data3js object

sides

The axis side to show the box, any combination of "x", "y" or "z"

dynamic

Should edges of the box closest to the viewer hide themselves automatically

col

Box color

geometry

Should the box be rendered as a physical geometry in the scene (see lines3js())

renderOrder

The render order for the box, defaults to 1

...

Other arguments to pass to material3js()

See Also

Other plot components: arrows3js(), axis3js(), grid3js(), legend3js(), light3js(), lines3js(), mtext3js(), points3js(), segments3js(), shape3js(), sphere3js(), surface3js(), text3js(), triangle3js()

Examples

Run this code
p <- plot3js.new()
p <- box3js(p)
r3js(p)

Run the code above in your browser using DataLab