0

Q: How can I change the location of a single node in a DiagrammeR flow diagram, using the native syntax? Even a hack is fine.

Unexpectedly, the rendering of the second block of code below came out the same as the first. I thought maybe that was because the x and y arguments only worked with particular layout arguments to render_graph(). But the rendering didn't change even after I use render_graph(g,layout="manual").

library(DiagrammeR)
g <- create_graph(attr_theme="tb")
g <- add_node(g)
g <- add_node(g)
g <- add_node(g)
render_graph(g)
library(DiagrammeR)
g <- create_graph(attr_theme="tb")
g <- add_node(g)
g <- add_node(g)
g <- add_node(g, node_aes = node_aes(x = 10, y = 10))
render_graph(g)
# Same :(
lowndrul
  • 3,715
  • 7
  • 36
  • 54
  • 1
    I don't see how to do what you want. I think if you want to specify x and y for one node, you'll need to specify them for all nodes. And then you can't use the `"tb"` theme. – user2554330 Sep 02 '23 at 19:53

0 Answers0