After a little work with pygraphviz, I returned to pydot. One useful method in pygraphviz is iterdegree (). Is it possible to do something similar with pydot? those. find the highest degree node so that I can set it as root?
Jjc
No answer in a year and a half? I donโt think there is a way with Pidot without writing code.
But you can use NetworkX with networkx.from_pydot () to convert to a GraphX โโNetworkX object, and then call the degree () method.