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.