Created
March 7, 2010 20:58
-
-
Save reiddraper/324624 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import networkx as nx | |
G = nx.read_gpickle('lebanese.mp3.graph.gpickle') | |
# pos has the x, y coordinates of the nodes | |
pos = nx.spring_layout(G) | |
# you'll need to figure out how to draw the edges yourself though I think | |
# drawing | |
# simplest | |
nx.draw(G, pos) | |
# more control | |
nx.draw_networkx_nodes(G, pos, node_color = 'k', alpha = 0.15, node_size = 25) | |
nx.draw_networkx_edges(G, pos, alpha = 0.30, arrows = False, edge_color='b') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment