I enjoyed reading this because it reminded me of a moment of hubris as junior developer. I was working with a complicated data structure I wanted to visualize, so I decided to write some quick code to basically read the data structure and output a graph as rectangles and lines connecting them. I was chastened by the complexity of just drawing the lines between boxes so that they didn't overlap (as much as possible) a…
Today (or twenty years ago, for that matter) I'd just output the data structure in graphviz syntax and throw it at the dot tool.
How to draw S-curved arrows between boxes
41–50 of 59 posts
Re: How to draw S-curved arrows between boxes
#42Re: How to draw S-curved arrows between boxes
#43Earlier quoted context omitted.
Yes, that is what I've noticed too. On medium/big projects macro-level(holistic) arrow functionality is far more important than having beautifully curved arrows from node A to node B. Solving that problem strangely resembles routing on a circuit board with buses, labels, colors, layers etc.
There is a section in Graphics Gems 3 that describes a layout system for an Atari ST DAW app.
Re: How to draw S-curved arrows between boxes
#44Earlier quoted context omitted.
Sometimes I wish there were a more modern replacement for Graphviz. There are things that it doesn't handle very well (e.g., nested subgraphs) and I feel like there are good (albeit proprietary) algorithms which could make their way into a general package.
I use dot, and manually position everything, then use the neato -n2 option to render: `dot -T ${format} -n${n} ${verbose>1?"-v ":""}-Goverlap-true -Gsplines=false -Kneato -o "${ output }" "${ input }"` this still doesn't do subgraphs well, so I sometime do the 'groups' in a separate document, then composite the layers with image magick `magick composite ${verbose>1?"-verbose ":""}-gravity NorthWest "${a}" "${b}" "${p…
Re: How to draw S-curved arrows between boxes
#45In the final analysis, one should strive to get a visually balanced look, which takes into account placement, thickness of lines, density of information etc. There is no one-size fits all.
Re: How to draw S-curved arrows between boxes
#46Earlier quoted context omitted.
I use dot, and manually position everything, then use the neato -n2 option to render: `dot -T ${format} -n${n} ${verbose>1?"-v ":""}-Goverlap-true -Gsplines=false -Kneato -o "${ output }" "${ input }"` this still doesn't do subgraphs well, so I sometime do the 'groups' in a separate document, then composite the layers with image magick `magick composite ${verbose>1?"-verbose ":""}-gravity NorthWest "${a}" "${b}" "${p…
Cool, I appreciate you sharing the info on your process!
Re: How to draw S-curved arrows between boxes
#47I've actually taken up hand-drawing diagrams lately and it's worked well. I get a lot of comments at work - "haha wow nice art!" (sarcasm) followed by "actually this is really easy to follow". I feel like it's both faster to draw and a more accurate representation of my mental model when I draw by hand.
But hey, if the diagramming tools were smart like in this post, maybe I'd go back to the tools for awhile ;)
Re: How to draw S-curved arrows between boxes
#48It's cute and definitely a great way to "draw S-curved arrow between boxes", but, under the assumption of being built to be used within a real project with dozens or hundreds of overlapping connections, this, like many other node systems, fails to be usable unless you push the complexity somewhere else.
So for example, if the user is responsible for organizing the boxes and there is also a way to create custom arrows, this library can be used to suggest arrows, which might be good 95% of the time. That would be better than many of the tools I have used over the years.
However, if you want to generate a final diagram and can't guarantee, that the order of boxes doesn't allow for overlapping connections, this library is probably the wrong choice.
Re: How to draw S-curved arrows between boxes
#49The graphviz system [1], originally from at&t labs, has a program called "dot" that does this kind of thing very well, including routing the arrows around other boxes that may be in the way. It's been open sourced. It's also been ported to the web [2] 1: https://graphviz.org/ 2: http://www.webgraphviz.com/?tab=map
Re: How to draw S-curved arrows between boxes
#50The graphviz system [1], originally from at&t labs, has a program called "dot" that does this kind of thing very well, including routing the arrows around other boxes that may be in the way. It's been open sourced. It's also been ported to the web [2] 1: https://graphviz.org/ 2: http://www.webgraphviz.com/?tab=map
Sometimes I wish there were a more modern replacement for Graphviz. There are things that it doesn't handle very well (e.g., nested subgraphs) and I feel like there are good (albeit proprietary) algorithms which could make their way into a general package.
[0] https://www.eclipse.org/elk