Description Usage Arguments Details Value Author(s) Examples
Riverplot styles
1 2 3 | default.style()
updateRiverplotStyle(style, master)
|
style |
style to update |
master |
master style to use for updating |
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:
(default: regular). Values:
rectangular box with a label
a color dot
No node is drawn. This is used to seamlessly integrate edges.
(default: sin). Describes how the edge looks like.
A sinusoidal edge
A straight edge
(default: "gradient"). How edge color is generated. Values:
A color gradient generated based on parent and child node that form the edge
The color specified in the "col" attribute of the edge
(default: "grey"). Color of the node or edge (for edges, it is used only if the "edgecol" attribute is "col".
(default: "90"). Rotation of the label (see par)
(default: 1). Line type to draw around node and edges
(default: "black"). Color of the node label.
(default: NULL). Label position, passed on to "pos" argument of the text() function.
(default: 1). Label cex, passed on to "cex" argument of the text() function.
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).
January Weiner
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 )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.