curve_edge() sets the curvature for a single edge on a dagitty or
tidy_dagitty object. Use set_curve_edges() to set multiple edges at once.
Curvature sign convention
The curvature value is passed directly to the active edge rendering engine. The ggraph engine (default) and ggarrow engine interpret the sign differently:
ggraph: positive curvature curves above (to the left of) a left-to-right edge.
ggarrow / grid: positive curvature curves below (to the right of) a left-to-right edge, following
grid::curveGrob()convention.
This means the same curvature value will render as a mirror image
depending on the engine. ggdag does not negate or transform the value;
each engine uses its native convention.
Examples
dag <- dagify(y ~ x + m, m ~ x)
dag <- curve_edge(dag, from = "m", to = "y", curvature = 0.5)
