What could cause NetworkX & PyGraphViz to work fine alone but not together?

后端 未结 2 1699
野的像风
野的像风 2020-12-02 13:18

I\'m working to learning some Python graph visualization. I found a few blog posts doing some things I wanted to try. Unfortunately I didn\'t get too far, encountering this

2条回答
  •  醉话见心
    2020-12-02 14:07

    nx.nx_pydot.graphviz_layout() seems to be the way to use graphviz_layout in Networkx release 1.11.

    You may need to install Graphviz via

    sudo apt-get install graphviz
    

    Some example code from the documentation:

    import networkx as nx
    G = nx.complete_graph(4)
    pos = nx.nx_pydot.graphviz_layout(G)
    

    I suggest this as the Graphviz_layout documentation for 1.11

提交回复
热议问题