Learn R Programming

patchPlot (version 0.1.5)

genHatchData: genHatchData

Description

Generate a collection of n RGB patches (square images with uniform background and hatching).

Usage

genHatchData(rgbcol, rgbhatch, side=20)

Arguments

rgbcol
nx3 matrix of RGB values in [0,1]. Colors of the background of patches.
rgbhatch
nx3 matrix of RGB values in [0,1]. Colors of hatchings.
side
side of each image patch, in pixels.

Value

rgbpatch object, structured as follows :
rchannel
n x squared(side) matrix, containing R values in [0,1] for the n patches. Each line, ie patch, is intended to be restored column-wise for drawing.
gchannel
same for G values.
bchannel
same for B values.

See Also

drawPatches

Examples

Run this code
coldata <- matrix(runif(30), ncol=3)
hatchdata <- matrix(runif(30), ncol=3)
patches <- genHatchData(coldata, hatchdata)

Run the code above in your browser using DataLab