View source: R/plot.triang.list.R
plot.triang.list | R Documentation |
A method for plot
. Plots the triangles of
a Delaunay triangulation of a set of points in the plane.
## S3 method for class 'triang.list'
plot(x, showrect = FALSE, add = FALSE,
xlab = "x", ylab = "y", main = "", asp = 1,
rectcol="black", ...)
x |
An object of class “triang.list” as produced by
|
showrect |
Logical scalar; show the enclosing rectangle |
add |
Logical scalar; should the plot of the triangles be added to an existing plot? |
xlab |
Label for the |
ylab |
Label for the |
main |
A title for the plot (used only if |
asp |
The aspect ratio of the plot; integer scalar or
|
rectcol |
Text string or integer specifying the colour in which the enclosing
rectangle should be plotted. Ignored unless |
... |
Arguments passed to |
None. This function has the side effect of producing (or adding to) a plot.
Users are strongly advised not to set the value of
asp
(unless they really know what they are doing) but rather
to leave asp
equal to its default value of 1
.
Any other value distorts the tesselation and destroys the
perpendicular appearance of lines which are indeed perpendicular.
(And conversely can cause lines which are not perpendicular to
appear as if they are.)
The argument asp
was added at the request of Zubin
Dowlaty (who presumably knows what he is doing!).
deldir()
, plot.triang.list()
,
tile.list()
, plot.tile.list()
set.seed(42)
x <- runif(20)
y <- runif(20)
d <- deldir(x,y)
ttt <- triang.list(d)
plot(ttt,border="red",showrect=TRUE,rectcol="green")
sss <- tile.list(d)
plot(sss)
plot(ttt,add=TRUE,border="blue",showrect=TRUE,rectcol="red")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.