Learn R Programming

spatstat.geom (version 3.7-0)

textureplot: Plot Image or Tessellation Using Texture Fill

Description

For a factor-valued pixel image, this command plots each level of the factor using a different texture. For a tessellation, each tile is plotted using a different texture.

Usage

textureplot(x, ...,
            main, add=FALSE, clipwin=NULL, do.plot = TRUE,
            border=NULL, col = NULL, lwd = NULL, lty = NULL, spacing = NULL,
            textures=1:8,
            legend=TRUE,
            leg.side=c("right", "left", "bottom", "top"),
            legsep=0.1, legwid=0.2)

Arguments

Value

(Invisible) A texture map (object of class "texturemap") associating a texture with each level of the factor.

Details

If x is a tessellation, then each tile of the tessellation is plotted and filled with a texture using add.texture.

If x is a factor-valued pixel image, then for each level of the factor, the algorithm finds the region where the image takes this value, and fills the region with a texture using add.texture.

See Also

im, plot.im, add.texture.

Examples

Run this code
  nd <- if(interactive()) 128 else 32
  Z <- setcov(owin(), dimyx=nd)
  Zcut <- cut(Z, 3, labels=c("Lo", "Med", "Hi"))
  textureplot(Zcut)
  textureplot(dirichlet(runifrect(6)))

Run the code above in your browser using DataLab