Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

Commit

Permalink
Merge pull request #6 from marcogoldin/develop
Browse files Browse the repository at this point in the history
Graph nodes coordinates
  • Loading branch information
jenkin authored Mar 26, 2017
2 parents 9ae518f + 771d264 commit 97c8ec9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fb_group.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
import facebook, logging, ConfigParser, sys, json
logging.basicConfig(level=logging.INFO)
from datetime import datetime
Expand Down Expand Up @@ -238,6 +239,12 @@
)
)

# node positioning algo
# http://networkx.readthedocs.io/en/latest/reference/drawing.html
pos=nx.spring_layout(G) # Fruchterman-Reingold

nx.set_node_attributes(G,'pos',pos)

try:
graph_type = config.get("Graph","graph_type")
except ConfigParser.NoOptionError, e:
Expand Down

0 comments on commit 97c8ec9

Please sign in to comment.