Learn R Programming

extracat (version 1.6-4)

f3dcol: Color array for fluctile3d

Description

Returns an array with color values with the same dimensions as the table or array x. Written for the col.array option in fluctile3d.

Usage

f3dcol(x, dims = c(1, 2), col.fun = rainbow_hcl, col.opt = list())

Arguments

x
A 3D data table or array.
dims
Which dimensions get differing color values. E.g. dims = c(1,3) means that the color values are the same for all cases with identical values in dimension 1 and 3 but possibly different values in dimension 2. dims = c(1,2,3) leads
col.fun
A function which produces a palette of n colors like rainbow or sequential_hcl, rainbow_hcl, <
col.opt
Options passed to the color palette function. NOT YET IMPLEMENTED.

Value

  • An array with hex colors.

See Also

fluctile3d

Examples

Run this code
x <- arsim(2000,c(5,7,4),2,shuffle=FALSE)
fluctile3d(x,col.array = f3dcol(x,col.fun = rainbow))
fluctile3d(x,col.array = f3dcol(x,col.fun = function(z) sample(rainbow(z))))
fluctile3d(x,col.array = f3dcol(x,col.fun = diverge_hcl))

Run the code above in your browser using DataLab