rgl2bitmap {export} | R Documentation |
Save currently active rgl 3D graph to bitmap format
Description
Save currently active rgl 3D graph to bitmap format in current orientation
Usage
rgl2bitmap(file = "Rplot", type = c("PNG"))
rgl2png(...)
Arguments
file |
name of output file. Any extension is ignored and added according to the requested output type. If file already exists it is overwritten. |
type |
desired output type - currently only |
... |
passing the |
Value
No return value
Functions
-
rgl2png()
: Save currently active rgl 3D graph to PNG format
Author(s)
Tom Wenseleers
Examples
# Create a file name
filen <- tempfile(pattern = "rgl") # or
# filen <- paste("YOUR_DIR/rgl")
# Generate a 3D plot using 'rgl'
x = y = seq(-10, 10, length = 20)
z = outer(x, y, function(x, y) x^2 + y^2)
rgl::persp3d(x, y, z, col = 'lightblue')
# Save the plot as a png
rgl2png(file = filen)
# Note that omitting 'file' will save in current directory
[Package export version 0.3.0 Index]