riverplot-styles: Riverplot styles

Description Usage Arguments Details Value Author(s) Examples

Description

Riverplot styles

Usage

1
2
3

Arguments

style

style to update

master

master style to use for updating

Details

Riverplot styles are just lists with key-value pairs that define how nodes and edges are drawn. Although there are attributes that are only applicable to either nodes or edges, there are no separate style lists for these objects.

The default.style function simply returns the default style defined in the riverplot package (including edge and node attributes).

The updateRiverplotStyle function updates all missing fields in the style object with the styles from the master style.

When a node is drawn, the styles are determined by precedence. Command line arguments to riverplot() function override any defined styles. For all other parameters styles associated with nodes are used, and if absent, inserted from the default.style argument to the riverplot() function. If this argument is missing, style is taken from the argument returned by the default.style function.

Not recognized fields and values will be silently ignored.

Following style fields and values are defined:

nodestyle

(default: regular). Values:

regular

rectangular box with a label

point

a color dot

invisible

No node is drawn. This is used to seamlessly integrate edges.

edgestyle

(default: sin). Describes how the edge looks like.

sin

A sinusoidal edge

straight

A straight edge

edgecol

(default: "gradient"). How edge color is generated. Values:

gradient

A color gradient generated based on parent and child node that form the edge

col

The color specified in the "col" attribute of the edge

horizontal

(default: FALSE). If set to TRUE, the edge will be drawn horizontally by repositioning the node on the right hand side. This may mess up the figure, so beware.

col

(default: "grey"). Color of the node or edge (for edges, it is used only if the "edgecol" attribute is "col".

srt

(default: "90"). Rotation of the label (see par)

lty

(default: 1). Line type to draw around node and edges

textcol

(default: "black"). Color of the node label.

textpos

(default: NULL). Label position, passed on to "pos" argument of the text() function.

textcex

(default: 1). Label cex, passed on to "cex" argument of the text() function.

Value

Both functions return an object of the riverplotStyle class (which is, in fact, just a list with key-value pairs that you can access, inspect and manipulate manually at will).

Author(s)

January Weiner

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# To view the default style specification, type
default.style()

ex <- riverplot.example()
ds <- default.style()
plot( ex, default_style= ds )

# nodes with unspecified style will now be semi-transparent red:
ds[["col"]] <- "#FF000099"
plot( ex, default_style= ds )

riverplot documentation built on Jan. 22, 2021, 5:09 p.m.