Why is grViz drawing a different graph every time? How can I freeze it?

I am using grViz function from DiagrammeR package and I have defined a graph. My problem is that every time I do this, I get a different convention.

for example you will get different plots every time you run the codes below. Is there a way to change this behavior? (i.e. freeze the graph)

 grViz(
  "digraph {

  node [shape=circle, style=filled, fillcolor=skyblue]
  1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19; 20

  1->2; 2->{3 4}; 3->4;
  5->6; 6->7
  8->{9 10 11}; 10->{9 11 12}; 11->12
  13->{14 15}
  16->{17 18 19}; 19->{18 20}
  4->5; 5->8; 11->13; 13->16

  }",engine="neato"
)

      

thank

+3


source to share


1 answer


it is the same graph in terms of nodes and edges, it just rotates, the relationship remains the same



enter image description hereenter image description hereenter image description here

0


source







All Articles