theme_void() with zero plot margins and a white background, plus
scale_y_reverse(): layout coordinates have y growing downward, as in
dagviz's SVG. The theme is an ordinary ggplot2 theme, so any of its
elements can be overridden by adding theme() settings afterwards.
Details
A legend gets a small margin on its right (legend.box.margin, 5.5 pt),
so that it doesn't touch the edge of the image. A plot without a legend
has no such margin.
Examples
dag <- as_dag(data.frame(from = c("a", "a", "b"), to = c("b", "c", "c")))
lay <- dag_layout(dag, style_metro())
ggplot2::ggplot() + dag_layers(lay) + dag_theme()