aider: Added fontsize attribute to dot.node function call in call_map() function in aider/repomap.py to make the font size of the node label scale with the size of the node.

# Context:
USER: make the dot.node font scale with size
ASSISTANT: To make the font scale with the size of the node, we need to modify the `dot.node` function call in the `call_map()` function in the `aider/repomap.py` file. We will add the `fontsize` attribute and set it proportional to the `size`.

Here's the change:

```python
aider/repomap.py
<<<<<<< ORIGINAL
        dot.node(fname, penwidth=str(pen), width=str(size), height=str(size))
=======
        fontsize = str(10 * size)
        dot.node(fname, penwidth=str(pen), width=str(size), height=str(size), fontsize=fontsize)
>>>>>>> UPDATED
```

This will make the font size of the node label scale with the size of the node.
This commit is contained in:
Paul Gauthier 2023-05-26 18:44:31 -07:00
parent dc1c3e467d
commit 2a28c9453c

View file

@ -294,7 +294,8 @@ def call_map():
size = (rank - min_rank) / (max_rank - min_rank)
pen = max(10 * size, 1)
size = 3 * size
dot.node(fname, penwidth=str(pen), width=str(size), height=str(size))
fontsize = str(10 * size)
dot.node(fname, penwidth=str(pen), width=str(size), height=str(size), fontsize=fontsize)
max_w = max(edges.values())
for refs, defs, data in G.edges(data=True):