from e6g_connection import DataRetriever import plotly.plotly as py from sets import Set import numpy as np import pprint import networkx as nx from plotly.graph_objs import * import matplotlib.pyplot as plt dr = DataRetriever() # posts = dr.getFirstPage() posts = dr.getFirstN(5) py.sign_in("humun", "9aq7qo7ayd") # [post,{tags}] # [tag,{posts}]] tagToPosts = {} postToTags = {} def scatter_nodes(pos, labels=None, color=None, size=20, opacity=1): # pos is the dict of node positions # labels is a list of labels of len(pos), to be displayed when hovering the mouse over the nodes # color is the color for nodes. When it is set as None the Plotly default color is used # size is the size of the dots representing the nodes # opacity is a value between [0,1] defining the node color opacity