Description Usage Arguments Value Examples
View source: R/apply_graph_theme.R
Apply multiple DiagrammeR global graph attributes
1 | apply_graph_theme(graph, ...)
|
graph |
The DiagrammeR::DiagrammeR graph to apply the attributes to. |
... |
One or more character vectors of length three, where the first element is
the attribute, the second the value, and the third, the attribute type ( |
The DiagrammeR::DiagrammeR graph.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | exampleJustifier <- '
---
assertion:
-
id: assertion_id
label: "An assertion"
decision:
-
id: decision_id
label: "A decision"
justification:
-
id: justification_id
label: "A justification"
assertion:
-
id: assertion_id
description: "A description of an assertion"
source:
-
id: source1_id
label: "First source"
-
id: source2_id
label: "second source"
---
';
justifications <-
load_justifications(text=exampleJustifier);
miniGraph_original <-
justifications$decisionGraphs[[1]];
miniGraph <-
apply_graph_theme(miniGraph_original,
c("color", "#0000AA", "node"),
c("shape", "triangle", "node"),
c("fontcolor", "#FF0000", "node"));
### This line should be run when executing this example as test, because
### rendering a DiagrammeR graph takes quite long
## Not run:
DiagrammeR::render_graph(miniGraph);
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.