From 26f4fa4564a7ba7e1f9dc11f2f32ab5e8cc5f50d Mon Sep 17 00:00:00 2001 From: Jonathan Corbet Date: Thu, 13 Jun 2024 16:24:19 -0600 Subject: [PATCH] treeplot: add a "twopi" option The result isn't really legible, but it's pretty... --- treeplot | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/treeplot b/treeplot index a4fbdfa..2bf8d1f 100755 --- a/treeplot +++ b/treeplot @@ -278,8 +278,11 @@ def SigStats(tree): def GV_out(file): graph = graphviz.Digraph('mainline', filename = file, format = 'svg') graph.body.extend(['label="Patch flow into the mainline"', - 'concentrate=true', - 'rankdir=LR' ]) + ' concentrate=true', + ' rankdir=LR' ]) + if args.twopi: + graph.body.extend([' layout = twopi; graph [ranksep=10]', + ' root=mainline']) graph.attr('node', fontsize="20", color="blue", penwidth='4', shape='ellipse') graph.node('mainline') @@ -359,6 +362,8 @@ def setup_args(): required = False, default = 200, type = int) p.add_argument('-s', '--signed', help = 'Display signed trees', action='store_true', default = False) + p.add_argument('-T', '--twopi', help = 'Do a twopi plot', + action = 'store_true', default = False) return p -- 2.11.4.GIT