Skip to content

Commit

Permalink
Merge branch 'biplot-regression'
Browse files Browse the repository at this point in the history
  • Loading branch information
jarioksa committed Jun 8, 2024
2 parents e1e5795 + e79613e commit b26517a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 4 additions & 6 deletions R/plot.cca.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,17 @@
return(invisible(pl))
}
if (missing(xlim)) {
xlim <- range(g$species[, 1], g$sites[, 1], g$constraints[, 1],
g$biplot[, 1],
xlim <- range(0, g$species[, 1], g$sites[, 1], g$constraints[, 1],
g$biplot[, 1], g$regression[,1],
if (length(g$centroids) > 0 && all(is.na(g$centroids))) NA else g$centroids[, 1],
g$default[, 1],
na.rm = TRUE)
}
if (!any(is.finite(xlim)))
stop("no finite scores to plot")
if (missing(ylim)) {
ylim <- range(g$species[, 2], g$sites[, 2], g$constraints[, 2],
g$biplot[, 2],
ylim <- range(0, g$species[, 2], g$sites[, 2], g$constraints[, 2],
g$biplot[, 2], g$regression[,2],
if (length(g$centroids) > 0 && all(is.na(g$centroids))) NA else g$centroids[, 2],
g$default[, 2],
na.rm = TRUE)
}
plot(g[[1]], xlim = xlim, ylim = ylim, type = "n", asp = 1,
Expand Down
4 changes: 3 additions & 1 deletion R/scores.ordiplot.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
`scores.ordiplot` <-
function (x, display = "sites", ...)
{
if (length(x) == 1)
if (length(x) == 1) {
attr(x[[1]], "score") <- display
return(x[[1]])
}
items <- names(x)
items <- items[!is.na(items)]
display <- match.arg(display, items)
Expand Down

0 comments on commit b26517a

Please sign in to comment.