rp.wire: A panel to rotate and choose the better view angle of a...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/rp.wire.R

Description

A panel (gui) rotate a wireframe plot and choose the best view angle.

Usage

1
rp.wire(wire)

Arguments

wire

a wireframe object.

Value

Open a window with sliders for x, y and z. Print the dput of the last view angle using the button.

Author(s)

Walmes Zeviani, walmes@ufpr.br.

See Also

wireframe(), panel.3d.contour().

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## Not run: 

# A simple example.

library(rpanel)
library(lattice)
library(latticeExtra)
library(RColorBrewer)

colr <- brewer.pal(11, "Spectral")
colr <- colorRampPalette(colr, space = "rgb")

grid <- expand.grid(x = seq(-1, 1, by = 0.1),
                    y = seq(-1, 1, by = 0.1))
grid$z <- with(grid, 1 + 0.01 * x + 0.05 * y -
                     0.5 * x * y - 0.5 * x^2 - 0.2 * y^2)

p1 <- wireframe(z ~ x + y, data = grid,
                scales = list(arrows = FALSE),
                col.regions = colr(101), drape = TRUE)
p1

# Choose the better angle.
rp.wire(p1)


## End(Not run)

walmes/wzRfun documentation built on Aug. 10, 2021, 2:19 p.m.