supposed I have a diagram like this.
library("DiagrammeR")
niv <- c("A","B","C","D","E","X","Y")
from <- c("A","A","A","A","B","C","D","E", "X", "B")
to <- c("B","C","D","E","X","X","Y","Y","Y", "C")
temp <- data.table(from=factor(from, levels=niv),
to=factor(to,levels=niv), col=c(rep("blue",5), rep("black",5)))
nodes <- create_node_df( n=length(niv), label=niv, width=0.3)
edges <- create_edge_df(from = temp$from, to = temp$to,
rel = "leading_to", label=temp$from, color=temp$col
,height = 25.5 # does nothing
, width = 55 # does nothing
)
graph <- create_graph( nodes_df = nodes, edges_df = edges)
render_graph(graph)
however what if I want to stretch the nodes way further apart like 2x further? The reason for this is that sometimes the network gets really large and I don't want all the nodes to bunch up. I tried changing the height and width as you can see in the above code but that does not seem to do anything. thanks.
edit: I found this but it appears to be outdated and create_edge as well as length does not seem to work anymore.