From 1c258caa7f5bff6606e4f622e5d25a23e06a86cb Mon Sep 17 00:00:00 2001 From: Alinson Xavier Date: Thu, 26 Mar 2015 18:21:37 -0400 Subject: [PATCH] Highlight integer edges --- scripts/draw_solution.sage | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/draw_solution.sage b/scripts/draw_solution.sage index 7b88cea..2ed04fc 100644 --- a/scripts/draw_solution.sage +++ b/scripts/draw_solution.sage @@ -77,8 +77,12 @@ plot = list_plot([], xmax=100, xmin=0, ymax=100, ymin=0) max_x = max([p[0] for p in all_points]) text_offset = vector([0,-1]) * max_x * 0.02 -plot = plot + sum([line([all_points[edges[k][0]], all_points[edges[k][1]]], - color=white.blend(red, 0.1 + 0.9 * edges[k][2])) for k in range(edges_count)]) +for k in range(edges_count): + if edges[k][2] > 0.99: + c = blue + else: + c = white.blend(red, 0.1 + 0.9 * edges[k][2]) + plot = plot + line([all_points[edges[k][0]], all_points[edges[k][1]]], color=c) if node_count < 30: for i in range(node_count):