radian.rescale: Calculate position of label with respect to vertex location...

View source: R/plot.functions.R

radian.rescaleR Documentation

Calculate position of label with respect to vertex location within a circle

Description

Useful for graphs drawn using igraph to reposition labels relative to vertices when vertices are laid out in a circle (as is common in network plots). igraph interprets position within vertex.label.degree as radians, so it is necessary to convert locations into radian values. This is the main role of this function.

Usage

radian.rescale(x, start = 0, direction = 1)

Arguments

x

A numeric vector of positions around a circle, typically sequentially numbered.

start

A number giving the offset from 12 o'clock in radians for the label locations.

direction

Either 1 for clockwise numbering (based on the order of x) or -1 for anti-clockwise.

Value

A numeric vector of rescaled values

References

https://gist.github.com/kjhealy/834774/a4e677401fd6e4c319135dabeaf9894393f9392c


MBNMAtime documentation built on Oct. 14, 2023, 5:08 p.m.