graphmod
graphmod copied to clipboard
How do I make resulting output sharper?
Hi, thanks for this great library!
I am building the module graph with following command:
graphmod --quiet --prune-edges $PROJECT_ROOT/src/**/*.hs | dot -Gsize=20,20! -Tpng -o module-graph.png
The PNG I get as a result is looking good, with two problems however:
- Node names are pretty small, so zooming in is required.
- Resolution is not high enough to be able to read the node names clearly even after zooming in.
Therefore, I would love to:
- Increase the font size of nodes.
- Increase the resolution of the image itself.
I tried increasing dot -Gsize=
to 40,40
and that helps with resolution, but I have no idea how to increase the font size. Any help is welcome!
I also tried doing dot -Nfontsize=20
, but that had no effect.
What I learned since asking this question is following:
- I probably just need to figure out how to make
dot
show the graph as I want, so this probably has nothing to do withgraphmod
itself. - I can use
-Gsize=N,N
to increase resolution, I can use-Nfontsize=N
to increase node label font size. There are different layoutsdot
can use, howeverfontsize
doesn't seem to work for me if I use it withdot
layout, which is the only layout that gives good results for this use case. So I am kind of stuck there. I managed to get fontsize working for other layouts, but fordot
layout, it gets ignored if it is bigger than ~12. I can put it to smaller, that makes it smaller, but anything beyond ~12 seems to be capped to 12 or something close to 12. I tried also doing-Nfixedsize=false
but that didn't help.
I realize now this has nothing to do with graphmod
, so feel free to close the issue -> I will still leave it open a bit, in case you can help me easily. Also, I am guessing some other people who don't know graphviz might also encounter this issue, so it might be useful for them to have this issue exist.