manipAxis: Modify the display of axes and nodes in a hive plot
Description
This function modifies various aspects of a HivePlotData
object. A typical use is to convert the radii from the native/absolute values in the original object to either a normalized value (0) or to a ranked value. The order of nodes on an axis can also be inverted, and an axis can be pruned (removed) from the HivePlotData
object.
manipAxis(HPD, method, action = NULL, ...)
- HPD
{
An object of S3 class HivePlotData
. }
- method
{
One of c("rank", "norm", "scale", "invert", "ranknorm", "prune")
giving the type of modification to be made.}
- action
{
For method = c("scale", "invert")
, a numeric vector of the same length as the number of axes. For "scale"
node radii will be multiplied by the corresponding value in this argument. For "invert"
a value of -1 will cause the corresponding axis to be inverted. For "prune"
, a single value specifying the axis to be pruned should be given.
}
- ...
{
Arguments to be passed downstream. Needed in this case for when plotHive
has arguments for grid
that get laundered through manipAxis
}
The rank method uses ties.method = "first"
so that each node gets a unique radius. For pruning, the nodes and edges are removed and then the remaining axes are renumbered to start from one. Exercise caution!
A modified HivePlotData
object.
http://academic.depauw.edu/~hanson/HiveR/HiveR.html
[object Object],[object Object]
set.seed(55)
test3 <- ranHiveData(nx = 3)
plotHive(test3)
plotHive(test3, method = "rank")
plotHive(test3, method = "norm")
plotHive(test3, method = "invert", action = c(-1, 1, 1))
#plotHive(test3, method = "prune", action = 1)
utilities