예제 #1
0
def test_plot_color_list(G):

    color = []

    for node in G.nodes():
        color.append(3)

    ig.plot(G, color_method=color)

    assert True
예제 #2
0
def test_plot_layout(G):

    color = []

    for node in G.nodes():
        color.append(3)

    ig.plot(G, layout="kamada")

    assert True
예제 #3
0
def test_plot_size_list(G):

    size = []

    for node in G.nodes():
        size.append(3)

    ig.plot(G, size_method=size)

    assert True
예제 #4
0
def test_plot(G):

    ig.plot(
        G,
        node_label="prop",
        node_label_position="middle center",
        edge_label="edge_prop",
        edge_text=["edge_prop"],
    )

    assert True
예제 #5
0
 def __call__(self, data, image_path, **kwargs):
     graph = data['graph']
     #jsdata = nx.readwrite.json_graph.cytoscape_data(graph)
     #print(jsdata)
     fig = ig.plot(
         graph,
         "Electra? Cute!",
         #color_method="name",
         node_text=["name"])
     name = os.path.basename(image_path)
     if name.find(".") >= 0:
         name = os.path.splitext(name)[0]
     fig.write_html(os.path.join("saves", name + "_finished.html"))
예제 #6
0
def test_plot_text(G):

    ig.plot(G, node_text=["prop"])

    assert True
예제 #7
0
def test_plot_property(G):

    ig.plot(G, size_method="prop", color_method="prop")

    assert True
예제 #8
0
def test_plot_fixed_size_color(G):

    ig.plot(G, size_method="static", color_method="#ffffff")

    assert True
예제 #9
0
def test_multigraph(MG):

    ig.plot(MG)

    assert True
예제 #10
0
def test_digraph(DG):

    ig.plot(DG)

    assert True