Skip to content

Commit

Permalink
Merge branch 'master' of github.com:benmaier/netwulf
Browse files Browse the repository at this point in the history
  • Loading branch information
benmaier committed Apr 9, 2019
2 parents 886b26f + bd42b12 commit f05e646
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,13 @@ Node attributes such as 'group' or 'size' that you define in your `networkx.Grap

```Python
import networkx as nx
import community
from netwulf import visualize

G = nx.random_partition_graph([10,10,10],.25,.01)
bb = community.best_partition(G) # dict of node-community pairs
nx.set_node_attributes(G, bb, 'group')
G = nx.random_partition_graph([10, 10, 10], .25, .01)
for k, v in G.nodes(data=True):
v['group'] = v['block']; del v['block']

visualize(G)
data = visualize(G)
```

![visualization example2](https://github.com/benmaier/netwulf/raw/master/img/attributes_1.png)
Expand Down

0 comments on commit f05e646

Please sign in to comment.