View source: R/setEdgeFormat.R
setEdgeFormat | R Documentation |
Functions to format nodes and edges in a causal loop diagram (CLD)
setEdgeFormat(CLD, property, value, polarity) setNodeFormat(CLD, groups, ...)
CLD |
An object of class CLD |
property |
The property of the edge or node being manipulated. Allowable values are provided in the details. |
value |
Value of the parameter to be assigned. Note that this is not validated against what values are allowed by GraphViz. See the documentation for GraphViz for a list of allowable values. |
polarity |
Polarity of edges for which the edge format is being manipulated.
When this parameter is not specified, |
... |
Format parameters as described in the details section below. |
group |
Character vector of group label(s) of nodes for which the node
format is being manipulated. When this parameter is not specified,
|
For setEdgeFormat()
, the following parameters are acted upon (all
others are ignored):
style
— Line style (e.g., "solid"
or "dotted"
)
color
— Line color
arrowhead
— Arrowhead style (e.g., "vee"
, "normal"
,
"box"
, or "diamond"
).
penwidthAdj
— Pen width adjustment factor. This gets multiplied
by the edge weight to establish the thickness ("pen width") of each line.
For setNodeFormat()
, the following parameters are acted upon (all
others are ignored):
shape
— Node shape (e.g., "rectangle"
, "oval"
,
"box"
or "egg"
)
style
— Node line style (e.g., "solid"
, "dashed"
,
"dotted"
or "bold"
)
color
— Line color for the node shape
fillcolor
— Fill color for the node
fontname
— Font for the node label
fontcolor
— Font color for the node label
height
— Base height of the node (all graphs are plotted with
fixedsize = FALSE
, such that height and width change to accomodate the
node labels)
width
— Base width of the node (all graphs are plotted with
fixedsize = FALSE
, such that height and width change to accomodate the
node labels)
Default attributes are adopted unless the attributes are specified through the function.
An updated CLD object.
L <- CLD(from = c("a","a","c"), to = c("b","c","a")) %>% setEdgeFormat("color", "midnightblue", polarity=-1) %>% setNodeFormat("fillcolor", "yellow") #plot(L)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.