rgl_init: Initialize RGL device

Description Usage Arguments Examples

View source: R/rgl_init.R

Description

Creates a new RGL device if requested or if there is no opened device

Usage

1
rgl_init(new.device = FALSE, bg = "white", width = 640)

Arguments

new.device

a logical value. If TRUE, creates a new RGL device

bg

the background color of the device

width

the width of the device

Examples

1
2
3
4
5
6
7
8
9
# Load dataset
data(iris)
x <- iris$Sepal.Length
y <- iris$Petal.Length
z <- iris$Sepal.Width
# Scatter plot
require("rgl")
rgl_init()
rgl.spheres(x, y, z, r = 0.2, color = "grey")

kassambara/graph3d documentation built on May 20, 2019, 7:40 a.m.