plot.texturemap | R Documentation |
Plot a representation of a texture map, similar to a plot legend.
## S3 method for class 'texturemap'
plot(x, ..., main, xlim = NULL, ylim = NULL,
vertical = FALSE, axis = TRUE,
labelmap = NULL, gap = 0.25,
spacing = NULL, add = FALSE)
x |
Texture map object (class |
... |
Additional graphics arguments passed to
|
main |
Main title for plot. |
xlim , ylim |
Optional vectors of length 2 giving the |
vertical |
Logical value indicating whether to arrange the texture boxes
in a vertical column ( |
axis |
Logical value indicating whether to plot an axis line joining the texture boxes. |
labelmap |
Optional. A |
gap |
Separation between texture boxes, as a fraction of the width or height of a box. |
spacing |
Argument passed to |
add |
Logical value indicating whether to add the graphics to an existing
plot ( |
A texture map is an association between data values and graphical
textures. An object of class "texturemap"
represents a texture
map. Such objects are returned from the plotting function
textureplot
, and can be created directly by the function
texturemap
.
This function plot.texturemap
is a method for the generic
plot
for the class "texturemap"
. It displays
a sample of each of the textures in the texture map, in a separate
box, annotated by the data value which is mapped to that texture.
The arrangement and position of the boxes is controlled by
the arguments vertical
, xlim
, ylim
and
gap
.
Null.
and \ege
texturemap
,
textureplot
,
add.texture
.
tm <- texturemap(c("First", "Second", "Third"), 2:4, col=2:4)
plot(tm, vertical=FALSE)
## abbreviate the labels
plot(tm, labelmap=function(x) substr(x, 1, 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.