rglColors: Surface colours for rgl

Description Usage Arguments Value Examples

View source: R/objects.R

Description

Generate colours for use in a surface display with package rgl

Usage

1
2
3
4
5
6
7
rglColors(
  z,
  pal = pal_pastels,
  no = length(unique(z)),
  col = fill,
  fill = pal(no)
)

Arguments

z

A numeric matrix of heights

pal

a colour palette to use

no

the number of colours to use

col, fill

Alternative names for the colours to use

Value

a colour vector suitable for use with rgl surface displays

Examples

1
cols <- rglColors(volcano)

BillVenables/WWRGraphics documentation built on Feb. 1, 2021, 12:13 p.m.