Frage

I installed networkx by using pip, however I cannot use the example given because I cannot import graphviz_layout. Then I download networkx and unzip it by myself. Still I cannot find graphviz_layout in the folder. There is just layout.py. Does anybody knows why?

War es hilfreich?

Lösung

The function for graphviz_layout() is in the nx_agraph.py file: http://networkx.github.io/documentation/latest/_modules/networkx/drawing/nx_agraph.html#graphviz_layout

In order to use it in NetworkX you need to also install PyGraphviz https://pypi.python.org/pypi/pygraphviz

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top