Thursday, July 19, 2018

Graph drawing in RStudio

RStudio can plot nice networks and graphs. By graph, I mean here the mathematical artifact: \(G = (V,E)\). I.e. a collection of nodes and arcs.

DiagrammeR is an R package that includes graphviz. RStudio has some support for graphviz input files (editing, drawing). Basically we need to specify nodes and arcs, and let the tool do its work.

Graphviz file in RStudio (picture from [1])

Network model used in [3]

I like it.


  1. DiagrammeR Docs, graphviz,
  2. Graphviz, Node, Edge and Graph attributes,
  3. Choosing boxes: set covering vs network models vs dynamic programming,