| plotmethods | R Documentation |
Custom plotting.
## S3 method for class 'linearpopn'
plot(x, ..., jitter = 0, plotline = TRUE)
## S3 method for class 'linearmask'
plot(x, ..., linecol = 'black', label = FALSE,
laboffset = c(spacing(x), 0))
x |
linearpopn object from |
... |
For |
jitter |
numeric value for jittering |
plotline |
logical; if TRUE the mask line is overplotted in grey |
linecol |
line colour for linear habitat (see Color Specification
in |
label |
logical; if TRUE each vertex is numbered |
laboffset |
offset of label from point (metres) |
The linear mask used for plotting a ‘linearpopn’ is the one saved as an attribute of the object.
The main plotting in plot.linearmask is done by
plot.mask with dots = TRUE. See the help for
plot.mask for details of options such as add. The
lines of the SpatialLinesdataFrame are overplotted unless
linecol = NA.
Jittering shifts points by a random uniform distance – (\pm 0.5
\times jitter) x mask spacing – on both axes. This can give
a better impression of density when points coincide.
The option inplot.popn for plotting rectangular ‘frame’ is
suppressed: do not attempt to pass this argument in ....
plot.linearpopn does not return a value.
plot.linearmask invisibly returns legend details as for plot.mask.
sim.linearpopn, plot.mask, plot.popn
x <- seq(0, 4*pi, length = 200)
xy <- data.frame(x = x*100, y = sin(x)*300)
mask <- read.linearmask(data = xy, spacing = 10)
linpop <- sim.linearpopn(mask, 100)
plot(linpop, jitter = 2)
plot(mask)
## thicker band of grey points, dashed line
plot(mask, cex = 2, lty = 2)
## add a covariate, the distance downstream from the first mask point
downstrm <- networkdistance(glymemask, glymemask[1,], glymemask)[,1]
covariates(glymemask)<- data.frame(downstream = downstrm)
## point colour determined by a covariate
plot(glymemask, cex = 2, covariate = 'downstream', pt.cex = 2)
## point size determined by a covariate
plot(glymemask, cex = covariates(glymemask)$downstream/50, pch = 21)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.