Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neato overlap=false doesn't respect initial positions much #52

Open
Cireo opened this issue Oct 22, 2024 · 0 comments
Open

Neato overlap=false doesn't respect initial positions much #52

Cireo opened this issue Oct 22, 2024 · 0 comments

Comments

@Cireo
Copy link

Cireo commented Oct 22, 2024

When generating a neato graph with overlap=false (and some other options)

digraph {
graph [splines=false, nodesep=1, overlap=false, outputorder=edgesfirst]
  node [fixedsize=true, pin=true];
  n1 [pos="x,y"];
  n1 -> n2;
  n2 [pos="x,y"];
   ...
  node [fixedsize=true, pin=false];
  n3 [pos="x,y"]
  n3 -> n1;
  n4 [pos="x,y"]
   ...
}

the positioning isn't respected well compared to dot -Kneato -Tsvg (OSX 5.0.1, and other versions).

Source file: eg.dot.txt

$ dot -V
dot - graphviz version 5.0.1 (20220820.1526)
$ cat eg.dot | dot -Kneato -Tsvg > eg-system.svg

$ grep node-graphviz@ pnpm-lock.yaml
  /[email protected]:
$ cat eg.dot | node -e 'require("node-graphviz").graphviz.neato(require("fs").readFileSync(process.stdin.fd, "utf-8"), "svg").then(console.log)' > eg-node.svg

Node (overlap)

eg-node

System (overlap)

eg-system

It seems to try for smaller numbers of nodes, but everything gets jumbled around afterwards.
If overlap is removed, the graphs are roughly equivalent.

Node (no overlap)

eg-node-no-overlap

System (no overlap)

eg-system-no-overlap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant