X-Git-Url: https://git.donarmstrong.com/?p=ape.git;a=blobdiff_plain;f=R%2Fplot.phylo.R;h=b9309a004882249ce7444517e1eb1bdb1157e63f;hp=96d9aa4e590a6f4b9262335d480fc197ea950076;hb=f5c4abe6ac31486e821d82788bf66b5db2be51d1;hpb=a0436318d70829a2d16134be7ca1d6d454613a20 diff --git a/R/plot.phylo.R b/R/plot.phylo.R index 96d9aa4..b9309a0 100644 --- a/R/plot.phylo.R +++ b/R/plot.phylo.R @@ -1,8 +1,8 @@ -## plot.phylo.R (2012-12-19) +## plot.phylo.R (2013-01-11) ## Plot Phylogenies -## Copyright 2002-2012 Emmanuel Paradis +## Copyright 2002-2013 Emmanuel Paradis ## This file is part of the R-package `ape'. ## See the file ../COPYING for licensing issues. @@ -650,12 +650,10 @@ node.height.clado <- function(phy) plot.multiPhylo <- function(x, layout = 1, ...) { - if (layout > 1) - layout(matrix(1:layout, ceiling(sqrt(layout)), byrow = TRUE)) - else layout(matrix(1)) - if (!par("ask")) { - par(ask = TRUE) - on.exit(par(ask = FALSE)) + layout(matrix(1:layout, ceiling(sqrt(layout)), byrow = TRUE)) + if (!devAskNewPage() && interactive()) { + devAskNewPage(TRUE) + on.exit(devAskNewPage(FALSE)) } for (i in 1:length(x)) plot(x[[i]], ...) } @@ -721,9 +719,9 @@ kronoviz <- function(x, layout = length(x), horiz = TRUE, ...) h <- 1 } layout(matrix(1:layout, nrow), widths = w, heights = h) - if (layout > Ntree && !par("ask")) { - par(ask = TRUE) - on.exit(par(ask = FALSE)) + if (layout < Ntree && !devAskNewPage() && interactive()) { + devAskNewPage(TRUE) + on.exit(devAskNewPage(FALSE)) } if (horiz) { for (i in 1:Ntree)