I updated my diagrammer
to version 0.9.0 and started rendering different diagram from the same data. My data frame now looks like this:
df <-
You can also set these attributes with
set_global_graph_attrs
after creating the graph object.
I tried the above and failed when doing the following:
set_global_graph_attrs(
graph = graph,
attr = c("layout", "rankdir", "splines"),
value = c("dot", "LR", "false"),
attr_type = c("graph", "graph", "graph"))
render_graph(graph2)
The output would still have the same graph attributes as before.
Using the magrittr %>%
then worked for me.
graph1 <-
create_graph(
nodes_df = ndf,
edges_df = edf) %>%
set_global_graph_attrs(
attr = c("layout", "rankdir", "splines"),
value = c("dot", "LR", "false"),
attr_type = c("graph", "graph", "graph"))
Documentation for all node, edge and graph attributes here: http://www.graphviz.org/doc/info/attrs.html#h:uses