Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ulfaslak committed Apr 9, 2019
1 parent ce0b2ff commit bd42b12
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 @@ -133,14 +133,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 bd42b12

Please sign in to comment.