plot.CLD: Plot a causal loop diagram object

View source: R/plot.CLD.R

plot.CLDR Documentation

Plot a causal loop diagram object

Description

Causal loop diagrams are generated through an interface to the DiagrammeR package. Node and edge characteristics can be modified directly by manipulating the CLD object or by using functions setEdgeFormat() and setNodeFormat().

Usage

## S3 method for class 'CLD'
plot(CLD, nodes = NULL, steps = 1, recolor = TRUE,
  textWidth = 10)

Arguments

CLD

an object of class CLD

nodes

Subset of nodes in the CLD to visualize.

steps

Nodes not in the nodes parameter will also be displayed if they are within steps edges of the CLD. By default, connections involving these nodes are recolored (see parameter recolor).

recolor

Logical. Recolor ancillary links (i.e., links involving nodes other than those specified in the nodes argument) to gray70.

textWidth

The target width of node names, which are all passed to stringr::str_wrap().

Details

See 'Sources' for links to additional documentation from the DiagrammeR package and the GraphViz website.

Author(s)

Jarrod Dalton

Source

http://rich-iannone.github.io/DiagrammeR/graphviz_and_mermaid.html
See especially the section on Attributes

http://graphviz.org/
http://graphviz.org/content/attrs

Examples

## Not run: 
#* Plots may open in a browser.
L <- CLD(from     = c("a","a","b","c","d","d","e"),
         to       = c("b","c","a","d","b","a","d"),
         polarity = c(1,1,-1,-1,1,-1,1)) %>%
  addNodeData(tibble::tibble(node="c", group="core")) %>%
  addNodeGroup("core", fontcolor="red", color="yellow")
plot(L)
plot(L, nodes=c("c"))

## End(Not run)

jarrod-dalton/causalloop documentation built on May 10, 2022, 8:08 a.m.