Loading src/absinth.py +14 −2 Original line number Diff line number Diff line Loading @@ -725,9 +725,21 @@ def draw_propagation(graph: nx.Graph, root_hub_list: list) -> None: pos = nx.spring_layout(graph, scale=3) mapping = {node:graph.node[node]['sense'] for node in graph.nodes} nodes = set for root1 in root_hub_list: for root2 in root_hub_list: path = nx.shortest_path(graph, root1, root2) for node in path: nodes.add(node) nx.draw_networkx_edges(graph, pos, alpha=0.4) edges = [edge for edge in graph.edges if edge[0] in nodes and edge[1] in nodes] mapping = {node:graph.node[node]['sense'] for node in nodes} nx.draw_networkx_edges(graph, pos, alpha=0.5, edgelist=edges) nx.draw_networkx_nodes(graph, pos, nodelist=list(mapping.keys()), Loading Loading
src/absinth.py +14 −2 Original line number Diff line number Diff line Loading @@ -725,9 +725,21 @@ def draw_propagation(graph: nx.Graph, root_hub_list: list) -> None: pos = nx.spring_layout(graph, scale=3) mapping = {node:graph.node[node]['sense'] for node in graph.nodes} nodes = set for root1 in root_hub_list: for root2 in root_hub_list: path = nx.shortest_path(graph, root1, root2) for node in path: nodes.add(node) nx.draw_networkx_edges(graph, pos, alpha=0.4) edges = [edge for edge in graph.edges if edge[0] in nodes and edge[1] in nodes] mapping = {node:graph.node[node]['sense'] for node in nodes} nx.draw_networkx_edges(graph, pos, alpha=0.5, edgelist=edges) nx.draw_networkx_nodes(graph, pos, nodelist=list(mapping.keys()), Loading