문제

After a little work with pygraphviz I've returned to pydot. One of the useful methods in pygraphviz is iterdegree(). Can something analogous be done with pydot? ie: find the highest degree node so that I can set it as root?

jjc

도움이 되었습니까?

해결책

No answer after a year and a half? I don't think there is a way with Pydot without writing some code.

But you could use NetworkX with the networkx.from_pydot() function to convert to a NetworkX graph object and then call the degree() method.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top