faces3d: Methods of 3D face plotting.

faces3dR Documentation

Methods of 3D face plotting.

Description

This function is used to plot the faces of either a trigrid, hexagrid or facelayer object in 3D space.

Usage

faces3d(x, ...)

## S4 method for signature 'trigrid'
faces3d(x, ...)

## S4 method for signature 'hexagrid'
faces3d(x, ...)

## S4 method for signature 'facelayer'
faces3d(x, col = "heat", breaks = NULL, inclusive = TRUE, legend = TRUE, ...)

Arguments

x

The trigrid, hexagrid or facelayer object to be plotted.

...

Further graphical parameters passed to (see plot3d) and the heatMapLegend function.

col

(character) Graphical parameter indicating the colours of the faces. A single value is accepted for logical values. Multiple colors will be passed to colorRampPalette, to create palettes for heat maps in case of numeric values. The default plotting method in this case is the reversed heat.colors. In case of categorical data, random colors will be chosen.

breaks

(numeric) Vector stating the breakpoints between the plotted levels. The argument is passed to the cut function.

inclusive

(logical): If there are values beyond the limits of breaks, should these be represented in the plot (TRUE) or left out completely FALSE?

legend

(logical) Should the heatmap legend be plotted?

Details

The function is built on the openGL renderer of the R package rgl.

Value

The function does not return any value.

Examples

# create a hexagonal grid
    g <- hexagrid(c(2,2))
# plot the grid in 3d space
# faces3d(g)
h <- hexagrid(8)
b <- facelayer(h)
values(b)<- rnorm(length(b))

adamkocsis/icosa documentation built on April 16, 2023, 10:05 p.m.