Commit b2971166 authored by msurl's avatar msurl
Browse files

changed layout when drawing graph

parent 5e0123f4
......@@ -13,6 +13,7 @@ import matplotlib.pyplot as plt
import gurobipy as gp
import sys
import datetime
import math
def add_constraints(G, m, nodes, root):
......@@ -91,5 +92,6 @@ if __name__ == '__main__':
duration_sec = duration.total_seconds()
print(f"iterations: {iterations}, duration(s): {duration_sec}")
color_map = ['red' if i in ds else 'green' for i in G.nodes]
nx.draw(G, node_color = color_map)
# nx.draw(G, node_color = color_map, with_labels = True)
nx.draw_kamada_kawai(G, node_color = color_map)
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment