Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I make resulting output sharper? #39

Open
Martinsos opened this issue Apr 13, 2022 · 1 comment
Open

How do I make resulting output sharper? #39

Martinsos opened this issue Apr 13, 2022 · 1 comment

Comments

@Martinsos
Copy link

Martinsos commented Apr 13, 2022

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:

  1. Node names are pretty small, so zooming in is required.
  2. Resolution is not high enough to be able to read the node names clearly even after zooming in.

Therefore, I would love to:

  1. Increase the font size of nodes.
  2. 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.

@Martinsos
Copy link
Author

What I learned since asking this question is following:

  1. I probably just need to figure out how to make dot show the graph as I want, so this probably has nothing to do with graphmod itself.
  2. I can use -Gsize=N,N to increase resolution, I can use -Nfontsize=N to increase node label font size. There are different layouts dot can use, however fontsize doesn't seem to work for me if I use it with dot 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 for dot 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant