textureplot | R Documentation |
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.
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)
x |
A tessellation (object of class |
... |
Other arguments passed to |
main |
Character string giving a main title for the plot. |
add |
Logical value indicating whether to draw on
the current plot ( |
clipwin |
Optional. A window (object of class |
do.plot |
Logical. Whether to actually do the plot. |
border |
Colour for drawing the boundaries between the different regions.
The default ( |
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 |
textures |
Textures to be used for each level. Either a texture map (object of
class |
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. |
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
.
(Invisible) A texture map (object of class "texturemap"
)
associating a texture with each level of the factor.
.
im
,
plot.im
,
add.texture
.
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)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.