persp_heat: Add heatmap colors to a perspective plot

Description Usage Arguments Details Value See Also Examples

Description

Helper function to add heatmap colors to a perspective plot.

Usage

1
persp_heat(z, pal = "heat", ...)

Arguments

z

matrix of values

pal

character string, one of 'heat' for heat colors, or 'redblue' for diverging red-blue palette

...

additional arguments passed to persp

Details

Plots a perspective plot with facets colored by z-value.

Value

persp plot.

See Also

ordiplot

Examples

1
2
3
4
5
6
7
8
# from the persp documentation:
x <- seq(-10, 10, length= 30)
y <- x
f <- function(x, y) { r <- sqrt(x^2+y^2); 10 * sin(r)/r }
z <- outer(x, y, f)
persp(x, y, z, theta = 30, phi = 30, expand = 0.5, col = 'lightblue')
persp_heat(z, theta = 30, phi = 30, expand = 0.5)
persp_heat(z, pal='redblue', theta = 30, phi = 30, expand = 0.5)

phytomosaic/foggy documentation built on Nov. 5, 2019, 12:20 a.m.