plot3d {icosa} | R Documentation |
3d plotting of an icosahedral grid, its subset or a data layer
Description
The function is built on the openGL renderer of the R package rgl
. The default plotting window size is 800x800
pixels. In case you want to override this, please
use the function with defaultPar3d=FALSE
after running par3d
(windowRect=<>)
.
Usage
plot3d(x,...)
## S3 method for class 'trigrid'
plot3d(x, type = c("l"), sphere = NULL, add = FALSE, guides = TRUE, ...)
## S3 method for class 'hexagrid'
plot3d(
x,
type = c("l"),
sphere = NULL,
color = "gray70",
add = FALSE,
guides = TRUE,
...
)
## S3 method for class 'facelayer'
plot3d(x, type = "f", frame = TRUE, guides = TRUE, defaultPar3d = TRUE, ...)
Arguments
x |
|
type |
( |
sphere |
( |
add |
( |
guides |
( |
... |
Further graphical parameters passed to (see |
color |
( |
frame |
( |
defaultPar3d |
( |
Format
An object of class function
of length 1.
Value
The function does not return any value.
Examples
# create a hexagonal grid
g <- hexagrid(c(2,2))
# plot the grid in 3d space
# plot3d(g, col="blue")
# make a subset to select faces
subG <- subset(g, c("F5", "F2"))
# plot the subset defined above
# plot3d(subG, type="f", col=c("orange"), add=TRUE, lwd=1)