north.arrow {biology}R Documentation

~~function to do ... ~~

Description

~~ A concise (1-5 lines) description of what the function does. ~~

Usage

north.arrow(s_x, s_y = NULL, height = 0.1, lwd = 1, cex = 1)

Arguments

s_x ~~Describe s_x here~~
s_y ~~Describe s_y here~~
height ~~Describe height here~~
lwd ~~Describe lwd here~~
cex ~~Describe cex here~~

Details

~~ If necessary, more details than the description above ~~

Value

~Describe the value returned If it is a LIST, use

comp1 Description of 'comp1'
comp2 Description of 'comp2'

...

Warning

....

Note

~~further notes~~

~Make other sections like Warning with section{Warning }{....} ~

Author(s)

~~who you are~~

References

~put references to the literature/web site here ~

See Also

~~objects to See Also as help, ~~~

Examples

##---- 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)
  }

[Package biology version 1.0 Index]