Draws what changed between two versions in one graph: links kept (grey),
gained (thick, in the colour of their graph) and lost (dashed orange);
features added (yellow) and removed (white, dashed border). By default only
the features touched by a change are drawn, and the minimal forms are
compared, so that the drawing shows what was written (an atomic set is drawn
as requirements both ways between its features, so that a feature joining or
leaving a set shows). The drawing is made as in vp_plot().
Arguments
- old
The older version of a model (from
vp_generate()orvp_read()).- new
The newer version of the same model.
- file
Where to save the drawing: a file ending in
.svg,.pdfor.png.NULL: no file (withengine = "graphviz", a temporary PDF file).- graph
The graph to compare:
"requires","excludes"or"atleastone".- minimal
Compare the minimal forms (
TRUE) or the complete graphs (FALSE: every consequence, often a tangle).- context
TRUE: only the features with a gained or lost link, and those added or removed;FALSE: all.- layout
How the nodes are placed:
"dot"(layers: best for requirements),"neato"and"fdp"(springs: best for conflicts),"sfdp"(springs, for large graphs; drawn as"fdp"by DiagrammeR),"circo"(a circle) or"twopi"(rings around a centre).- engine
"diagrammer"(the R packages DiagrammeR, DiagrammeRsvg and rsvg) or"graphviz"(the programs of Graphviz).- rankdir
The direction of the layers:
"BT"puts the features that are required at the top,"TB"at the bottom,"LR"and"RL"left to right and right to left.- max_nodes
Refuse to draw more nodes than this: compare a part instead, with
vp_subset()on both versions.- width, height
The size of the htmlwidget (any CSS size, or a number of pixels);
NULLlets it fill the space.
See also
Other drawing:
vp_dot(),
vp_dot_compare(),
vp_plot()
Examples
old <- vp_generate(vp_example("miband3_planned.uvl"))
new <- vp_generate(vp_example("miband3_realized.uvl"))
if (requireNamespace("DiagrammeR", quietly = TRUE)) {
vp_plot_compare(old, new)
}