rich-iannone / DiagrammeR

Graph and network visualization using tabular data in R
https://rich-iannone.github.io/DiagrammeR/
Other
1.69k stars 248 forks source link

Engine option always uses 'dot' #398

Open DarthHeizenberg opened 4 years ago

DarthHeizenberg commented 4 years ago

Calling any of the following:

DiagrammeR::grViz("test.gv")
DiagrammeR::grViz("test.gv", engine = "circo")
DiagrammeR::grViz("test.gv", engine = "twopi")
DiagrammeR::grViz("test.gv", engine = "neato")

file:test.gv

digraph RecordShapedNodes {
  splines=curved;
  overlap=false;
   rec_horizontal [ shape=record label="Vertical bars|seperate|the individual field" ]
   rec_vertical   [ shape=record label="The initial|{orientation|(top down|or left right)}|{is dependent|{on the|value}|{of|rankdir}|and can be|changed with curly braces}}"]
   rec_Mrecord    [ shape=Mrecord label="{An Mrecord|has rounded|corners}" ]
   rec_ports_1    [ shape=record  label="{ports|<from_2>to connect}|{allow|<to_1>fields and/or nodes}" ]
   rec_ports_2    [ shape=record  label="foo|<to_2>bar|baz}" ]
   rec_horizontal -> rec_vertical -> rec_Mrecord[ style=invis ]
   rec_Mrecord -> rec_ports_1:to_1
   rec_ports_1:from_2 -> rec_ports_2:to_2
}

all result in identical layouts as below: Screen Shot 2020-05-20 at 10 25 42 AM

Testing the same on https://dreampuf.github.io/GraphvizOnline shows the following with "neato" as an example: Screen Shot 2020-05-20 at 10 29 28 AM

DarthHeizenberg commented 4 years ago

Version info:

Screen Shot 2020-05-20 at 10 20 39 AM Screen Shot 2020-05-20 at 10 19 50 AM

jefshe commented 3 years ago

I fixed this a while back but my commit seems to have been reverted by @rich-iannone .

Not sure why 😕

Here is the fix: https://github.com/rich-iannone/DiagrammeR/pull/339

And here is reversion: https://github.com/rich-iannone/DiagrammeR/commit/b7cb1113a4d005b1508f435a6b00c8fb4e607234#diff-26693e304ea701f2f1dbca6415ba073e6fc2579e373e4a2215359e418e4bb53b