From 6956ed8f81ed863b5391f2a06337a0ebb2d49983 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 26 May 2023 17:10:05 -0700 Subject: [PATCH] aider: Changed the size of the nodes in the graph by modifying the `dot.node()` function call to include `width` and `height` attributes. # Context: USER: for the nodes, make their size bigger not just penwidth ASSISTANT: To change the size of the nodes in the graph, you can modify the `dot.node()` function call by adding the `fontsize` attribute. Here's the change you need to make in the `aider/repomap.py` file: ```python a ^C KeyboardInterrupt USER: not the fontsize, the size of the circle ASSISTANT: To change the size of the circle representing the nodes in the graph, you can modify the `dot.node()` function call by adding the `width` and `height` attributes. Here's the change you need to make in the `aider/repomap.py` file: ```python aider/repomap.py <<<<<<< ORIGINAL pen = 10 * (rank - min_rank) / (max_rank - min_rank) + 1 dot.node(fname, penwidth=str(pen)) ======= size = 10 * (rank - min_rank) / (max_rank - min_rank) + 1 dot.node(fname, penwidth=str(size), width=str(size), height=str(size)) >>>>>>> UPDATED ``` --- aider/repomap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aider/repomap.py b/aider/repomap.py index 2b311e677..62879b252 100644 --- a/aider/repomap.py +++ b/aider/repomap.py @@ -289,8 +289,8 @@ def call_map(): for fname in G.nodes(): fname = str(fname) rank = ranked[fname] - pen = 10 * (rank - min_rank) / (max_rank - min_rank) + 1 - dot.node(fname, penwidth=str(pen)) + size = 10 * (rank - min_rank) / (max_rank - min_rank) + 1 + dot.node(fname, penwidth=str(size), width=str(size), height=str(size)) max_w = max(edges.values()) for refs, defs, data in G.edges(data=True):