textureplot

0th

Percentile

Plot Image Using Texture Fill

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

Keywords
hplot, spatial
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
x
Pixel image (object of class "im") whose pixel values are a factor with at most 8 levels.
...
Other arguments passed to add.texture.
main
Character string giving a main title for the plot.
add
Logical value indicating whether to draw on the current plot (add=TRUE) or to initialise a new plot (add=FALSE).
clipwin
Optional. A window (object of class "owin"). Only this subset of the image will be displayed.
do.plot
Logical. Whether to actually do the plot.
border
Colour for drawing the boundaries between the different regions. The default (border=NULL) means to use par("fg"). Use border=NA to omit borders.
col
Numeric value or vector giving the colour or colours in which the textures should be plotted.
lwd
Numeric value or vector giving the line width or widths to be used.
lty
Numeric value or vector giving the line type or types to be used.
spacing
Numeric value or vector giving the spacing parameter for the textures.
textures
Textures to be used for each level. Either a texture map (object of class "texturemap") or a vector of integer codes (to be interpreted by add.texture).
legend
Logical. Whether to display an explanatory legend.
leg.side
Position of legend relative to main plot.
legsep
Separation between legend and main plot, as a fraction of the shortest side length of the main plot.
legwid
Width (if vertical) or height (if horizontal) of the legend as a fraction of the shortest side length of the main plot.
Details

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.

Value

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

See Also

im, plot.im, add.texture.

Aliases
  • textureplot
Examples
Z <- cut(setcov(owin()), 3, labels=c("Lo", "Med", "Hi"))
  textureplot(Z)
Documentation reproduced from package spatstat, version 1.37-0, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.