Skip to content

Instantly share code, notes, and snippets.

View audhiaprilliant's full-sized avatar
🎯
Focusing

Audhi Aprilliant audhiaprilliant

🎯
Focusing
View GitHub Profile
@jg-you
jg-you / draw_nx_beautiful.py
Last active February 3, 2025 09:09
Beautiful networkx graph
import copy
import networkx
import matplotlib.pyplot as plt
# Generate a graph.
# Here I chose an ER graph.
g = nx.erdos_renyi_graph(20, 0.3)
# Get positions.
# Here I use the spectral layout and add a little bit of noise.