Learn R Programming

spatstat.geom (version 3.7-0)

plot.texturemap: Plot a Texture Map

Description

Plot a representation of a texture map, similar to a plot legend.

Usage

# S3 method for texturemap
plot(x, ..., main, xlim = NULL, ylim = NULL,
                           vertical = FALSE, axis = TRUE,
                           side = if(vertical) "right" else "bottom",
                           labelmap = NULL, gap = 0.25,
                           spacing = NULL, add = FALSE)

Arguments

Value

Null.

Details

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.

See Also

texturemap, textureplot, add.texture.

Examples

Run this code
   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))

Run the code above in your browser using DataLab