38 Matching Annotations
  1. Dec 2025
    1. net = Network(select_menu=True) net.from_nx(G) neighbor_map = net.get_adj_list() for node in net.nodes: x, y = pos[node["id"]] node["x"] = x*10000 node["y"] = y*10000 node["title"] += " Neighbors:\n" + "\n".join(neighbor_map[node["id"]]) node["value"] = len(neighbor_map[node["id"]]) net.toggle_physics(False) net.save_graph("trc_graph_select.html")

      I had to use this code:

      net = Network(select_menu=True, notebook=True, cdn_resources='remote') net.from_nx(G) neighbor_map = net.get_adj_list() for node in net.nodes: x, y = pos[node["id"]] node["x"] = x10000 node["y"] = y10000 node["title"] += " Neighbors:\n" + "\n".join(neighbor_map[node["id"]]) node["value"] = len(neighbor_map[node["id"]]) net.toggle_physics(False) net.save_graph("trc_graph_select.html") net.show("trc_graph_select.html")

    1. net.save_graph("simple_graph.html") Copy to clipboard from IPython.display import HTML HTML(filename="simple_graph.html")

      this code is not needed. you only need: net.show("x.html") --> you will create the name

  2. Nov 2025