3 ## Alignment Explorer With Multiple Devices
5 ## Copyright 2012 Emmanuel Paradis
7 ## This file is part of the R-package `ape'.
8 ## See the file ../COPYING for licensing issues.
10 alex <- function(x, ...)
15 on.exit(dev.set(devmain))
17 cat("Click on two opposite corners of the zone you want to zoom-in.
18 Right-click to exit.\n")
21 if (is.null(xy)) break
22 xy <- lapply(xy, function(x) sort(round(x)))
23 i1 <- xy$y[1L]; i2 <- xy$y[2L]
24 j1 <- xy$x[1L]; j2 <- xy$x[2L]
25 if (i1 > n || j1 > s) cat("Try again!\n") else {
34 } else dev.set(devsub)
35 image(x[i1:i2, j1:j2], xaxt = "n", ...)
37 axis(1, atx, labels = (j1:j2)[atx])
38 title(sub = paste("From", sQuote(deparse(substitute(x)))))