getBioNetNodeLinkLine: Get X and Y Coordinates for An Arrow between Two Nodes

Description Usage Arguments Details Value Author(s) Examples

View source: R/caOmicsV.bioNetCircos.R

Description

Calculate x and y coordinates for an customized arrow head and tail with defined length to connect two nodes.

Usage

1
    getBioNetNodeLinkLine(lineX, lineY, arrowSize=1, lineLength)

Arguments

lineX

numeric vector, x coordinates of the link line

lineY

numeric vector, y coordinates of the link line

arrowSize

non-negative numeric, scaling factor for arrow size, default 1

lineLength

non negative integer, the length of link line

Details

An arrow is drawn as a polygon. By default, the arrow is in inside of a circle (radius 1) without tail and it points to radian 0. The tail, if any, will be added to the left.

Value

A two dimensional numeric matrix for x and y coordinates of the arrow.

Author(s)

Henry Zhang

Examples

1
2
3
4
5
6
7
    from <- c(1, 1)
    to   <- c(2, 2)
    lineX <- seq(from[1], to[1], 1000)
    lineY <- seq(from[2], to[2], 1000)

    lineLength <- sqrt((from[1]-to[1])^2 + (from[2]-to[2])^2)
    positions <- getBioNetNodeLinkLine(lineX, lineY, arrowSize=1, lineLength)

hzhanghenry/caOmicsV documentation built on May 17, 2019, 10:07 p.m.