-
Notifications
You must be signed in to change notification settings - Fork 145
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
add -x to graphviz to prune isolated nodes and peninsulas #1249
Conversation
Pull Request Test Coverage Report for Build 9906449128Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should really add an extra kwarg option for this, or a better choice would be generic way to set extra flags when calling graphviz. We definitely don't want to always do this with neato because it removes nodes from the graph. If you look at the examples from the pr summary the after example is missing a fair number of nodes.
That all being said does neato not expose this option via graph attributes or something a user can already set today?
@@ -210,7 +214,7 @@ def node_attr(node): | |||
return image | |||
else: | |||
subprocess.run( | |||
[prog, "-T", output_format, "-o", filename], | |||
[prog, "-x", "-T", output_format, "-o", filename] + extra_args, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[prog, "-x", "-T", output_format, "-o", filename] + extra_args, | |
[prog, "-T", output_format, "-o", filename] + extra_args, |
As an alternative approach, from qiskit's usage of |
I agree with Matthew that we should have |
Closing because Qiskit/qiskit#12770 is the right way to do it. |
On many nodes,
neato
seems to fold on its own.With the parameter
-x
, the problem seems fixed: