north.arrow {biology} | R Documentation |
~~ A concise (1-5 lines) description of what the function does. ~~
north.arrow(s_x, s_y = NULL, height = 0.1, lwd = 1, cex = 1)
s_x |
~~Describe s_x here~~ |
s_y |
~~Describe s_y here~~ |
height |
~~Describe height here~~ |
lwd |
~~Describe lwd here~~ |
cex |
~~Describe cex here~~ |
~~ If necessary, more details than the description above ~~
~Describe the value returned If it is a LIST, use
comp1 |
Description of 'comp1' |
comp2 |
Description of 'comp2' |
~~further notes~~
~Make other sections like Warning with Warning .... ~
~~who you are~~
~put references to the literature/web site here ~
~~objects to See Also as help
, ~~~
##---- Should be DIRECTLY executable !! ---- ##-- ==> Define data, use random, ##-- or do help(data=index) for the standard data sets. ## The function is currently defined as function (s_x, s_y = NULL, height = 0.1, lwd = 1, cex = 1) { require(Hmisc) if (is.null(s_y)) { s_y <- s_x$y s_x <- s_x$x } dims <- par()$usr ht <- dims[2] - dims[1] wt <- dims[4] - dims[3] fac_y <- ht * height fac_x <- wt * (height * 1) b1 <- bezier(c(0, -0.01, -0.04), c(1, 0.55, 0.5)) b2 <- bezier(c(-0.04, -0.02, 0), c(0.5, 0.484, 0.48)) xs <- (c(b1$x, b2$x, 0, 0) * fac_x) + s_x ys <- (c(b1$y, b2$y, 0, 1) * fac_y) + s_y polygon(xs, ys, xlim = c(0, 1), ylim = c(0, 1), col = "black") lines((c(-0.04, 0.04) * fac_x) + s_x, (c(0.38, 0.38) * fac_y) + s_y, lwd = 1, lend = 2) text((0 * fac_x) + s_x, (1 * fac_y) + s_y, "N", font = 2, pos = 3, cex = cex) }