Graph layout using NetworkX