示例#1
0
    deg = [v * 50 for _, v in G.degree()]
    nx.draw_networkx_nodes(G, pos, node_size=deg, linewidths=1.0, alpha=0.60)
    nx.draw_networkx_edges(G,
                           pos,
                           width=1.0,
                           style='dashed',
                           edge_color='cadetblue',
                           alpha=0.6)
    nx.draw_networkx_labels(G,
                            pos, {n: n.split('@')[0]
                                  for n in G.nodes},
                            font_size=8,
                            font_color='darkorchid')

    plt.axis('off')
    plt.show()


if __name__ == '__main__':
    MBOX_PATH = f'{os.path.dirname(__file__)}/tests/test.mbox'

    reader = MBoxReader(
        '/Users/samuel/EmailNetwork/emailnetwork/emailnetwork/tests/test.mbox')
    # reader = MBoxReader('/Users/vincentiuscalvin/Documents/Supertype/mbox-dataset/Ori_Sample_01.mbox')
    # reader = MBoxReader('/Users/samuel/EmailNetwork/samuel-supertype.mbox')
    # plot_single_directed(reader,300)
    # plot_single_directed(reader, 1, True)
    # plot_directed(reader)
    # plot_directed(reader, "shell")
    plot_undirected(reader, 'spring')