pipe_color_factors | R Documentation |
Color factors (background color)
pipe_color_factors(
graf,
field = "frequency",
lo = "#FCFDBF",
hi = "#9F189F",
mid = "#D5438E",
fixed = NULL,
pal = 1
)
graf |
A mapfile representing a causal map. A mapfile is a tidygraph, which consists of a table of edges linked to a table of nodes, with an optional additional table of statements. In this package, nodes are called 'factors' and edges are called 'links.' |
field |
A numerical or character field in the factor table. If it is character, the other parameters are ignored and a color-blind friendly qualitative palette is applied. |
lo |
Optionally, a color specification for the low end of the color range. Default is 'green'. |
hi |
Optionally, a color specification for the high end of the color range. Default is 'blue'. |
mid |
Optionally, a color specification for the middle of the color range. Default is 'gray'. |
fixed |
Optionally, a color specification which will be applied everywhere and overrides 'field'. |
A mapfile with a new or overwritten column 'color.background'in the factor table.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.