Create a map that associates data values with graphical textures.
texturemap(inputs, textures, ...)
An object of class "texturemap"
representing the texture map.
A vector containing all the data values that will be mapped to textures.
Optional. A vector of integer codes specifying the textures
to which the inputs
will be mapped.
Other graphics parameters such as col
, lwd
, lty
.
Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk.
A texture map is an association between data values and graphical
textures. The command texturemap
creates an object of class
"texturemap"
that represents a texture map.
Once a texture map has been created, it can be applied to any
suitable data to generate a texture plot of those data
using textureplot
.
This makes it easy to ensure that
the same texture map is used in two different plots.
The texture map can also be plotted in its own right.
The argument inputs
should be a vector containing all the
possible data values (such as the levels of a factor) that are to be
mapped.
The textures
should be integer values between 1 and 8,
representing the eight possible textures
described in the help for add.texture
.
The default is textures = 1:n
where
n
is the length of inputs
.
textureplot
texturemap(letters[1:4], 2:5, col=1:4, lwd=2)
Run the code above in your browser using DataLab