Plot a bounding box in 3D

# S3 method for boundingbox
plot3d(
  x,
  col = "black",
  gridlines = FALSE,
  plotengine = getOption("nat.plotengine"),
  ...
)

Arguments

x

the boundingbox object to plot.

col

The colour of the bounding box lines (default 'black')

gridlines

Whether to display gridlines when using plotly as the backend plotting engine (default: FALSE)

plotengine

the plotting backend engine to use either 'rgl' or 'plotly'.

...

additional arguments to pass to segments3d.

Value

A list of rgl object IDs (as returned by segments3d) or a plotly object.

See also

Examples

# find the bounding box of all the neurons in a list
boundingbox(kcs20)
#>          [,1]     [,2]     [,3]
#> [1,] 284.5940  24.1869  21.4379
#> [2,] 404.6951 122.9557 102.8015
#> attr(,"class")
#> [1] "boundingbox"
boundingbox(kcs20[1:3])
#>          [,1]     [,2]    [,3]
#> [1,] 285.0244  25.2430 21.4379
#> [2,] 390.7747 114.6351 98.3324
#> attr(,"class")
#> [1] "boundingbox"
# \donttest{
# plot those neurons
plot3d(kcs20)
# ... with their bounding box
plot3d(boundingbox(kcs20))