Note
Click here to download the full example code
Plot various graph properties#
import nngt
import nngt.plot as nplt
from nngt.geometry import Shape
nngt.seed(0)
Let’s start by making a random exponential graph
shape = Shape.disk(100)
g = nngt.generation.distance_rule(5, shape=shape, nodes=1000, avg_deg=20)
Let’s plot the distances
nplt.edge_attributes_distribution(g, "distance", show=True)
We then compute the betweenness and see how it correlates with the distance
Let’s check the correlations between various node properties and their degree
Total running time of the script: ( 1 minutes 12.720 seconds)