## Spring_layout doesn’t works properly with weights

I’m trying to use weights to define the distance between the nodes but it’s not working. I even tried to use normalized values without success. import networkx as nx import matplotlib.pyplot as plt G …

## Networkx graph and labels

I am having some troubles to understand how networkx library works & nodes’ labels. Let’s assume I have a correlation matrix in a pandas dataframe: import pandas as pd import networkx as nx import …

## KeyError when assign colours to nodes

I am getting a KeyError when I try to create a network. My dataset is Node Neighbors Colour Weight Luke Alte orange 3 Luke John orange 3 Michael Laura …

## Is there a networkx functiuon to calculate number of edges between communities?

I have used Louvain algorithm for community detection. Then position the communities with respect to each other: create a new, weighted graph, where each node corresponds to a community, and the …

## Plot the dendrogram of communities found by NetworkX Girvan-Newman algorithm

The Girvan-Newman algorithm for community detection in networks: detects communities by progressively removing edges from the original graph. The algorithm removes the “most valuable” edge, …

## Labeling edges in networkx

I´m programming a basic neural network and want to plot it as a picture. For that i created all the nodes and edges i need. for l, j in zip(self.layers, range(len(self.layers))): for n, …

## How do I customize the display of edge labels in networkx?

I create a graph with edge attributions (say r, such as, r=23). How do display edge labels only with the values, 23 instead of {‘r’:’23’}. Related source codes are below: # build a graph G.add_edge(…

## Interface between networkx and igraph

I’ve been working with networkx for quite some time now and it’s been serving my purposes quite well with minimal tweaks until recently when I started looking into community detection. In comparison, …

## graph from weighted edge list from a database

I have list of weighted edges stored in database. How can I easily create a Graph from it (without writing it in a file and reading it) Here the reproductible import sqlite3 con = sqlite3.connect(…

## Storing and Accessing node attributes python networkx

I have a network of nodes created using python networkx. i want to store information in nodes such that i can access the information later based on the node label (the name of the node) and the field …