[Vegan-commits] r2534 - in pkg/vegan: R inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Jun 21 06:20:10 CEST 2013
Author: gsimpson
Date: 2013-06-21 06:20:10 +0200 (Fri, 21 Jun 2013)
New Revision: 2534
Modified:
pkg/vegan/R/ordisurf.R
pkg/vegan/R/plot.ordisurf.R
pkg/vegan/inst/ChangeLog
pkg/vegan/man/ordisurf.Rd
Log:
all setting lwd for contours
Modified: pkg/vegan/R/ordisurf.R
===================================================================
--- pkg/vegan/R/ordisurf.R 2013-06-21 04:02:11 UTC (rev 2533)
+++ pkg/vegan/R/ordisurf.R 2013-06-21 04:20:10 UTC (rev 2534)
@@ -21,7 +21,7 @@
fx = FALSE, add = FALSE, display = "sites", w = weights(x),
main, nlevels = 10, levels, npoints = 31, labcex = 0.6,
bubble = FALSE, cex = 1, select = TRUE, method = "REML",
- gamma = 1, plot = TRUE, ...)
+ gamma = 1, plot = TRUE, lwd.cl = par("lwd"), ...)
{
weights.default <- function(object, ...) NULL
if(!missing(thinplate)) {
@@ -156,7 +156,8 @@
(select && !isTRUE(all.equal(as.numeric(summary(mod)$edf), 0))))
contour(xn1, xn2, matrix(fit, nrow=GRID), col = col, add = TRUE,
levels = levels, labcex = labcex,
- drawlabels = !is.null(labcex) && labcex > 0)
+ drawlabels = !is.null(labcex) && labcex > 0,
+ lwd = lwd.cl)
}
mod$grid <- list(x = xn1, y = xn2, z = matrix(fit, nrow = GRID))
class(mod) <- c("ordisurf", class(mod))
Modified: pkg/vegan/R/plot.ordisurf.R
===================================================================
--- pkg/vegan/R/plot.ordisurf.R 2013-06-21 04:02:11 UTC (rev 2533)
+++ pkg/vegan/R/plot.ordisurf.R 2013-06-21 04:20:10 UTC (rev 2534)
@@ -1,6 +1,7 @@
`plot.ordisurf` <- function(x, what = c("contour","persp","gam"),
add = FALSE, bubble = FALSE, col = "red", cex = 1,
- nlevels = 10, levels, labcex = 0.6, ...) {
+ nlevels = 10, levels, labcex = 0.6,
+ lwd.cl = par("lwd"), ...) {
what <- match.arg(what)
y <- x$model$y
x1 <- x$model$x1
@@ -23,7 +24,8 @@
levels <- pretty(range(x$grid$z, finite = TRUE), nlevels)
contour(X, Y, Z, col = col, add = TRUE,
levels = levels, labcex = labcex,
- drawlabels = !is.null(labcex) && labcex > 0)
+ drawlabels = !is.null(labcex) && labcex > 0,
+ lwd = lwd.cl)
} else if(isTRUE(all.equal(what, "persp"))) {
persp(X, Y, Z, col = col, cex = cex, ...)
} else {
Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog 2013-06-21 04:02:11 UTC (rev 2533)
+++ pkg/vegan/inst/ChangeLog 2013-06-21 04:20:10 UTC (rev 2534)
@@ -20,6 +20,9 @@
* ordipointlabel: now uses `ordiArgAbsorber()` to stop the warnings
about non-graphical paramters being passed to plotting functions.
+ * ordisurf: can now pass in a line width for the contours via
+ argument `lwd.cl`.
+
Version 2.1-30 (opened May 5, 2013)
* bioenv: can now use Mahalanobis, Manhattan and Gower distances
Modified: pkg/vegan/man/ordisurf.Rd
===================================================================
--- pkg/vegan/man/ordisurf.Rd 2013-06-21 04:02:11 UTC (rev 2533)
+++ pkg/vegan/man/ordisurf.Rd 2013-06-21 04:20:10 UTC (rev 2534)
@@ -17,7 +17,7 @@
display = "sites", w = weights(x), main, nlevels = 10,
levels, npoints = 31, labcex = 0.6, bubble = FALSE,
cex = 1, select = TRUE, method = "REML", gamma = 1,
- plot = TRUE, ...)
+ plot = TRUE, lwd.cl = par("lwd"), ...)
\method{ordisurf}{formula}(formula, data, ...)
@@ -25,7 +25,7 @@
\method{plot}{ordisurf}(x, what = c("contour","persp","gam"),
add = FALSE, bubble = FALSE, col = "red", cex = 1,
- nlevels = 10, levels, labcex = 0.6, \dots)
+ nlevels = 10, levels, labcex = 0.6, lwd.cl = par("lwd"), \dots)
}
\arguments{
@@ -108,6 +108,8 @@
\item{plot}{logical; should any plotting be done by
\code{ordisurf}? Useful if all you want is the fitted response
surface model.}
+ \item{lwd.cl}{numeric; the \code{lwd} (line width) parameter to use
+ when drawing the contour lines.}
\item{formula, data}{Alternative definition of the fitted model as
\code{x ~ y}, where left-hand side is the ordination \code{x} and
right-hand side the single fitted continuous variable
More information about the Vegan-commits
mailing list