Top "Networkx" questions

NetworkX is a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks.

How do I transform a "SciPy sparse matrix" to a "NumPy matrix"?

I am using a python function called "incidence_matrix(G)", which returns the incident matrix of graph. It is from …

python numpy scipy sparse-matrix networkx
How to set the output size in GraphViz for the dot format?

I want to make sure, that all nodes are within some range (say [0,0,W,H]) after layout. I figured bounding …

graphviz networkx pygraphviz pyprocessing
How can I specify an exact output size for my networkx graph?

The above is the output of my current graph. However, I have yet to manage what I am trying to …

python image networkx
Plot NetworkX Graph from Adjacency Matrix in CSV file

I have been battling with this problem for a little bit now, I know this is very simple - but …

python csv numpy networkx
Plotting directed graphs in Python in a way that show all edges separately

I'm using Python to simulate a process that takes place on directed graphs. I would like to produce an animation …

python networkx graph-visualization
Can one get hierarchical graphs from networkx with python 3?

I am trying to display a tree graph of my class hierarchy using networkx. I have it all graphed correctly, …

python networkx pygraphviz
How to increase node spacing for networkx.spring_layout

Drawing a clique graph with import networkx as nx .... nx.draw(G, layout=nx.spring_layout(G)) produces the following …

python graph networkx graph-drawing
AttributeError: module 'networkx' has no attribute 'from_pandas_dataframe'

I have networkx v. 2.1. to make it work w/ pandas dataframe, i tried following: installed via pip3, this did not …

pandas networkx
Combine (join) networkx Graphs

Say I have two networkx graphs, G and H: G=nx.Graph() fromnodes=[0,1,1,1,1,1,2] tonodes=[1,2,3,4,5,6,7] for x,y in zip(fromnodes,…

python graph-theory networkx
Node labels using networkx

I'm creating a graph out of given sequence of Y values held by curveSeq. (the X values are enumerated automatically: 0,1,2...) …

python matplotlib networkx