News for hackers. Stuff that matters.
Re:Graphviz: Open-source graph visualization software by nyellin on Monday January 17, 2022 @08:37AM (#29966404)
Here are some cool things I've done recently with graphviz:

1. Draw "sketch" style graphs using https://sketchviz.com/new

2. Draw graphs of memory usage in golang programs (using pprof): https://graphviz.org/Gallery/directed/pprof.html

3. Embed graphviz into Sphinx docs (shameless self-promotion: https://docs.robusta.dev/master/catalog/triggers/index.html#...)

Re:Graphviz: Open-source graph visualization software by rajandatta on Monday January 17, 2022 @09:29AM (#29966838)
My single biggest issue with Graphic is that the quality of Arrow end-points is very poor. They don't terminate cleanly at the destination. This is visible in the 2nd link you've posted.

I'm amazed that this hasn't been addressed. It's been there for years.

Makes the end products impracticable for distribution in a professional setting. It's Ok if you're the only consumer ... not great for other cases.

Re:Graphviz: Open-source graph visualization software by feanaro on Monday January 17, 2022 @10:24AM (#29967452)
I remember this issue being raised, I think on the graphviz Discourse, and the graphviz developers responding to it as if it was a hard to solve limitation of graphviz for some reason. But I can't for the life of me remember the details.
Re:Graphviz: Open-source graph visualization software by graphviz on Monday January 17, 2022 @01:46PM (#29970165)
"Very poor" seems harsh, but, yes, it hurts us, too. (That, and text with slightly-off baselines.)

The relevant code starts around https://gitlab.com/graphviz/graphviz/-/blob/main/lib/common/... If this isn't right, maybe somebody can figure out why. Perhaps the loop stops sometimes on the wrong side of the boundary? Anyway, it's equally possible that when the endpoint coord is handed off to a lower level driver, the arrowhead mitering is wrong. There is no question there was once upon time explicit code to try to cope with this problem, at least in the native PSgen, but I can't find it now. Maybe it wore away as waves of open source development washed over it, along with static tables for a bunch of "standard" PS fonts.

For more background, see for example https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/s...

In the worst case, this has to be debugged for all the drivers in https://gitlab.com/graphviz/graphviz/-/tree/main/plugin

No doubt there are more details if anyone can remember them.

Re:Graphviz: Open-source graph visualization software by s5806533 on Tuesday January 18, 2022 @05:04AM (#29977118)
I think I found at some point that the arrows could be made correct -- at least for the SVG rendering in Firefox -- by removing the stroke (stroke-width="0").
Re:Graphviz: Open-source graph visualization software by pphysch on Monday January 17, 2022 @01:27PM (#29969871)
Ostensibly each arrow style graphic would need an explicitly-defined "attach point" at whatever is deemed the "tip", so that the tip can be oriented perfectly in relation to the vertex and edge of the GraphViz graph.

If nothing like that exists, I can see how it would be a very troublesome refactor.

Re:Graphviz: Open-source graph visualization software by graphviz on Monday January 17, 2022 @01:47PM (#29970169)
Oh, that too. Feature interaction is a killer, isn't it.
Re:Graphviz: Open-source graph visualization software by pvaldes on Tuesday January 18, 2022 @06:46AM (#29977767)
I never had this problem. Arrow style is configurable if I remember correctly. You can configure (extend) also overlapping in boxes so the arrows never enter into the box area.

I'm talking by heart and I could be wrong in any case.

Re:Graphviz: Open-source graph visualization software by IAmEveryone on Monday January 17, 2022 @02:19PM (#29970575)
I once created a dataset of X-hooked-up-with-Y for my circle of friends. About 50 nodes and a few hundred connections (after I asked around a bit for additions).

It became a wedding present for one rather central "node" with the title "drosophila neural regulation network" or something like it. No names, just lines and circles. It's still the centerpiece in his home office.

Re:Graphviz: Open-source graph visualization software by erwincoumans on Monday January 17, 2022 @01:27PM (#29969861)
Very cool. About Sketchviz

1) is there an option to make the graph horizontal instead of vertical? 2) can you make the svg option separate, instead of hidden behind the PNG button (with CTRL key)? 3) how did you do the handwriting style?

Re:Graphviz: Open-source graph visualization software by hun-nemethpeter on Monday January 17, 2022 @04:19PM (#29971792)
Yes, the name of this attribute is rankdir.

See in the docs: https://graphviz.org/docs/attrs/rankdir/

In the sketch example:

  digraph G {
    rankdir="LR";
    graph [fontname = "Handlee"];
    ...
Re:Graphviz: Open-source graph visualization software by taubek on Monday January 17, 2022 @09:08AM (#29966663)
I like the output of Sketchviz. Do yo know if it is possible do make such output directly from desktop app?
Re:Graphviz: Open-source graph visualization software by fsiefken on Monday January 17, 2022 @09:48AM (#29967030)
you can install it locally with docker https://github.com/iamacarpet/sketchviz-docker
Re:Graphviz: Open-source graph visualization software by taubek on Monday January 17, 2022 @10:24AM (#29967448)
Thanks! Docker makes my computer so slow... And it would probably be an over kill for me. But it is nice to know that it exists.
Re:Graphviz: Open-source graph visualization software by chuchana on Tuesday January 18, 2022 @06:26AM (#29977650)
Haven't tried it yet, but this looks pretty spot on: https://github.com/gpotter2/sketchviz
Re:Graphviz: Open-source graph visualization software by nyellin on Monday January 17, 2022 @09:41AM (#29966946)
Sadly I haven't found a way. Let me know if you do
Re:Graphviz: Open-source graph visualization software by taubek on Monday January 17, 2022 @10:23AM (#29967428)
Will do.
Re:Graphviz: Open-source graph visualization software by erwincoumans on Monday January 17, 2022 @10:06AM (#29967239)
Sketchviz look great. Is there an option to export vector graphics (for example svg)?
Re:Graphviz: Open-source graph visualization software by cldellow on Monday January 17, 2022 @10:16AM (#29967352)
If you hold down control, the "Download PNG" button becomes "Download SVG".

Super intuitive, I know! :)

Re:Graphviz: Open-source graph visualization software by erwincoumans on Monday January 17, 2022 @11:07AM (#29967979)
Haha, why is that feature hidden? Like the latest Tesla Model 3 v11 update hides many features :-)