GraphViz.jl icon indicating copy to clipboard operation
GraphViz.jl copied to clipboard

Does not seem to handle certain position related attributes

Open Binary-Eater opened this issue 4 years ago • 6 comments

Examples include attributes like rankdir.

Versions of involved components used

  • Julia v1.6.3
  • GraphViz.jl v0.2.0
  • IJulia v1.23.2

Snippet for replicating the problem.

digraph graphname {
rankdir="BT";
overlap=false;
     a [shape="box",URL="https://www.google.com",label="Game",target="_blank"];
     b [shape="box",URL="https://www.google.com"];
     a -> b [minlen=10,taillabel = "taillabel"];
 }

What is seen in the local jupyter notebook

251221151818

What is see when using graphviz to generate a PNG from the same dot snippet

test

Binary-Eater avatar Dec 25 '21 23:12 Binary-Eater

First of all, thank you for this package!

I also observe that there is a problem with rankdir.

digraph so 
{
   rankdir = LR;
   A -> B -> C -> D;
}

Does not work as expected (at least under Pluto)

Expected result: image

Result under pluto.jl: image

vincent-picaud avatar Feb 16 '22 16:02 vincent-picaud

Same here. Could it be the version of graphviz?

abelsiqueira avatar Nov 02 '22 12:11 abelsiqueira

Hi! I also experience this issue in Pluto with GraphViz 7.0.2. Does anyone find a way to solve this or diagnose where the issue comes from?

SebastianCallh avatar Dec 01 '22 12:12 SebastianCallh

I have created a pull request that should fix this. Can you check with ] add https://github.com/abelsiqueira/GraphViz.jl#38-add-engine-attribute. I don't know how to do add custom pkgs on Pluto.

abelsiqueira avatar Dec 02 '22 15:12 abelsiqueira

@abelsiqueira Thanks, I have tested it, on my side it works pluto_test

To reproduce:

under bash mkdir /tmp/test_pluto Start Julia and ] to reach ** Pkg** mode

activate "/tmp/test_pluto"
add Pluto
add https://github.com/abelsiqueira/GraphViz.jl#38-add-engine-attribute

switch back to Julia mode using Pluto; Pluto.run()

Then under Pluto

  • Cell 1
begin
	import Pkg
	Pkg.activate("/tmp/test_pluto")
	Pkg.status("GraphViz")
end
  • Cell 2 using GraphViz
  • Cell 3
dot"""
digraph so 
{
   rankdir = LR;
   A -> B -> C -> D;
}
"""

vincent-picaud avatar Dec 02 '22 16:12 vincent-picaud