Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. Dear Lazyfedi, can anyone recommend a software tool for hand-directed graph layout?

Dear Lazyfedi, can anyone recommend a software tool for hand-directed graph layout?

Scheduled Pinned Locked Moved Uncategorized
20 Posts 16 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • simontatham@hachyderm.ioS This user is from outside of this forum
    simontatham@hachyderm.ioS This user is from outside of this forum
    simontatham@hachyderm.io
    wrote last edited by
    #1

    Dear Lazyfedi, can anyone recommend a software tool for hand-directed graph layout?

    If I have a graph (say, of a finite state machine or something), I can write it in Graphviz DOT format and feed it to xdot, which will do a complete job of layout: decide where the nodes go, figure out some nice curved paths for the edges so they don't go through other nodes or cross over too often.

    But if it doesn't do a good enough job, I don't know of any way to slightly tweak its output. As far as I know there's no way I can overrule its decisions about where to put the vertices, but still have it do the rest of the job for me like drawing all the edges. If I'm not 100% happy with its own choices, I have to do the whole thing myself instead.

    Anyone know of a good interactive tool that will let me drag the vertices around, and automatically move the edges with them?

    simontatham@hachyderm.ioS dysfun@social.treehouse.systemsD echopapa@social.tchncs.deE russss@chaos.socialR ireneista@adhd.irenes.spaceI 14 Replies Last reply
    0
    • simontatham@hachyderm.ioS simontatham@hachyderm.io

      Dear Lazyfedi, can anyone recommend a software tool for hand-directed graph layout?

      If I have a graph (say, of a finite state machine or something), I can write it in Graphviz DOT format and feed it to xdot, which will do a complete job of layout: decide where the nodes go, figure out some nice curved paths for the edges so they don't go through other nodes or cross over too often.

      But if it doesn't do a good enough job, I don't know of any way to slightly tweak its output. As far as I know there's no way I can overrule its decisions about where to put the vertices, but still have it do the rest of the job for me like drawing all the edges. If I'm not 100% happy with its own choices, I have to do the whole thing myself instead.

      Anyone know of a good interactive tool that will let me drag the vertices around, and automatically move the edges with them?

      simontatham@hachyderm.ioS This user is from outside of this forum
      simontatham@hachyderm.ioS This user is from outside of this forum
      simontatham@hachyderm.io
      wrote last edited by
      #2

      (I have considered the option of using 'Untangle' from my puzzle collection! Encode my graph as an Untangle game description; drag the vertices around in the game until it looks reasonable; recover their final positions from a saved game file. But Untangle only knows how to draw straight-line edges, and can't make the edges swerve around things that are in the way.)

      1 Reply Last reply
      0
      • simontatham@hachyderm.ioS simontatham@hachyderm.io

        Dear Lazyfedi, can anyone recommend a software tool for hand-directed graph layout?

        If I have a graph (say, of a finite state machine or something), I can write it in Graphviz DOT format and feed it to xdot, which will do a complete job of layout: decide where the nodes go, figure out some nice curved paths for the edges so they don't go through other nodes or cross over too often.

        But if it doesn't do a good enough job, I don't know of any way to slightly tweak its output. As far as I know there's no way I can overrule its decisions about where to put the vertices, but still have it do the rest of the job for me like drawing all the edges. If I'm not 100% happy with its own choices, I have to do the whole thing myself instead.

        Anyone know of a good interactive tool that will let me drag the vertices around, and automatically move the edges with them?

        dysfun@social.treehouse.systemsD This user is from outside of this forum
        dysfun@social.treehouse.systemsD This user is from outside of this forum
        dysfun@social.treehouse.systems
        wrote last edited by
        #3

        @simontatham no, but i tend to use dia

        simontatham@hachyderm.ioS 1 Reply Last reply
        0
        • simontatham@hachyderm.ioS simontatham@hachyderm.io

          Dear Lazyfedi, can anyone recommend a software tool for hand-directed graph layout?

          If I have a graph (say, of a finite state machine or something), I can write it in Graphviz DOT format and feed it to xdot, which will do a complete job of layout: decide where the nodes go, figure out some nice curved paths for the edges so they don't go through other nodes or cross over too often.

          But if it doesn't do a good enough job, I don't know of any way to slightly tweak its output. As far as I know there's no way I can overrule its decisions about where to put the vertices, but still have it do the rest of the job for me like drawing all the edges. If I'm not 100% happy with its own choices, I have to do the whole thing myself instead.

          Anyone know of a good interactive tool that will let me drag the vertices around, and automatically move the edges with them?

          echopapa@social.tchncs.deE This user is from outside of this forum
          echopapa@social.tchncs.deE This user is from outside of this forum
          echopapa@social.tchncs.de
          wrote last edited by
          #4

          @simontatham

          have you tried drawio? But it's more like Visio

          Link Preview Image
          draw.io

          favicon

          (www.drawio.com)

          1 Reply Last reply
          0
          • dysfun@social.treehouse.systemsD dysfun@social.treehouse.systems

            @simontatham no, but i tend to use dia

            simontatham@hachyderm.ioS This user is from outside of this forum
            simontatham@hachyderm.ioS This user is from outside of this forum
            simontatham@hachyderm.io
            wrote last edited by
            #5

            @dysfun yes, I've used that once in a similar context – unlike Inkscape, it understands the idea of an arrow being attached to a box so that dragging the box moves the arrow endpoint too. But I think it has the same problem as my silly idea of using Untangle: only straight edges, where I'm likely to need them to curve.

            dysfun@social.treehouse.systemsD rogerbw@discordian.socialR 2 Replies Last reply
            0
            • simontatham@hachyderm.ioS simontatham@hachyderm.io

              @dysfun yes, I've used that once in a similar context – unlike Inkscape, it understands the idea of an arrow being attached to a box so that dragging the box moves the arrow endpoint too. But I think it has the same problem as my silly idea of using Untangle: only straight edges, where I'm likely to need them to curve.

              dysfun@social.treehouse.systemsD This user is from outside of this forum
              dysfun@social.treehouse.systemsD This user is from outside of this forum
              dysfun@social.treehouse.systems
              wrote last edited by
              #6

              @simontatham it's got beziers

              1 Reply Last reply
              0
              • simontatham@hachyderm.ioS simontatham@hachyderm.io

                @dysfun yes, I've used that once in a similar context – unlike Inkscape, it understands the idea of an arrow being attached to a box so that dragging the box moves the arrow endpoint too. But I think it has the same problem as my silly idea of using Untangle: only straight edges, where I'm likely to need them to curve.

                rogerbw@discordian.socialR This user is from outside of this forum
                rogerbw@discordian.socialR This user is from outside of this forum
                rogerbw@discordian.social
                wrote last edited by
                #7

                @simontatham @dysfun dia can do Bézier lines, but that may well not be enough.
                In Graphviz there's the "pos" attribute for nodes, but that only works in neato and tdp.

                1 Reply Last reply
                0
                • simontatham@hachyderm.ioS simontatham@hachyderm.io

                  Dear Lazyfedi, can anyone recommend a software tool for hand-directed graph layout?

                  If I have a graph (say, of a finite state machine or something), I can write it in Graphviz DOT format and feed it to xdot, which will do a complete job of layout: decide where the nodes go, figure out some nice curved paths for the edges so they don't go through other nodes or cross over too often.

                  But if it doesn't do a good enough job, I don't know of any way to slightly tweak its output. As far as I know there's no way I can overrule its decisions about where to put the vertices, but still have it do the rest of the job for me like drawing all the edges. If I'm not 100% happy with its own choices, I have to do the whole thing myself instead.

                  Anyone know of a good interactive tool that will let me drag the vertices around, and automatically move the edges with them?

                  russss@chaos.socialR This user is from outside of this forum
                  russss@chaos.socialR This user is from outside of this forum
                  russss@chaos.social
                  wrote last edited by
                  #8

                  @simontatham I love OmniGraffle for this, but it's commercial Mac-only software (and one of the reasons why I'm still on macOS...)

                  1 Reply Last reply
                  0
                  • simontatham@hachyderm.ioS simontatham@hachyderm.io

                    Dear Lazyfedi, can anyone recommend a software tool for hand-directed graph layout?

                    If I have a graph (say, of a finite state machine or something), I can write it in Graphviz DOT format and feed it to xdot, which will do a complete job of layout: decide where the nodes go, figure out some nice curved paths for the edges so they don't go through other nodes or cross over too often.

                    But if it doesn't do a good enough job, I don't know of any way to slightly tweak its output. As far as I know there's no way I can overrule its decisions about where to put the vertices, but still have it do the rest of the job for me like drawing all the edges. If I'm not 100% happy with its own choices, I have to do the whole thing myself instead.

                    Anyone know of a good interactive tool that will let me drag the vertices around, and automatically move the edges with them?

                    ireneista@adhd.irenes.spaceI This user is from outside of this forum
                    ireneista@adhd.irenes.spaceI This user is from outside of this forum
                    ireneista@adhd.irenes.space
                    wrote last edited by
                    #9

                    @simontatham yeahhhhh this was the problem that got us wanting to write our own diagram editor, twenty years ago

                    (we didn't finish, so we don't have it to offer)

                    1 Reply Last reply
                    0
                    • simontatham@hachyderm.ioS simontatham@hachyderm.io

                      Dear Lazyfedi, can anyone recommend a software tool for hand-directed graph layout?

                      If I have a graph (say, of a finite state machine or something), I can write it in Graphviz DOT format and feed it to xdot, which will do a complete job of layout: decide where the nodes go, figure out some nice curved paths for the edges so they don't go through other nodes or cross over too often.

                      But if it doesn't do a good enough job, I don't know of any way to slightly tweak its output. As far as I know there's no way I can overrule its decisions about where to put the vertices, but still have it do the rest of the job for me like drawing all the edges. If I'm not 100% happy with its own choices, I have to do the whole thing myself instead.

                      Anyone know of a good interactive tool that will let me drag the vertices around, and automatically move the edges with them?

                      maehw@chaos.socialM This user is from outside of this forum
                      maehw@chaos.socialM This user is from outside of this forum
                      maehw@chaos.social
                      wrote last edited by
                      #10

                      @simontatham do you know about PlantUML? Or is that the wrong direction of tooling?

                      uep@timeloop.cafeU 1 Reply Last reply
                      0
                      • simontatham@hachyderm.ioS simontatham@hachyderm.io

                        Dear Lazyfedi, can anyone recommend a software tool for hand-directed graph layout?

                        If I have a graph (say, of a finite state machine or something), I can write it in Graphviz DOT format and feed it to xdot, which will do a complete job of layout: decide where the nodes go, figure out some nice curved paths for the edges so they don't go through other nodes or cross over too often.

                        But if it doesn't do a good enough job, I don't know of any way to slightly tweak its output. As far as I know there's no way I can overrule its decisions about where to put the vertices, but still have it do the rest of the job for me like drawing all the edges. If I'm not 100% happy with its own choices, I have to do the whole thing myself instead.

                        Anyone know of a good interactive tool that will let me drag the vertices around, and automatically move the edges with them?

                        loopspace@mathstodon.xyzL This user is from outside of this forum
                        loopspace@mathstodon.xyzL This user is from outside of this forum
                        loopspace@mathstodon.xyz
                        wrote last edited by
                        #11

                        @simontatham It's been a while since I used graphviz in depth, but I think you can get it to produce a .dot file of its result which you could then edit and feed back in.

                        1 Reply Last reply
                        0
                        • simontatham@hachyderm.ioS simontatham@hachyderm.io

                          Dear Lazyfedi, can anyone recommend a software tool for hand-directed graph layout?

                          If I have a graph (say, of a finite state machine or something), I can write it in Graphviz DOT format and feed it to xdot, which will do a complete job of layout: decide where the nodes go, figure out some nice curved paths for the edges so they don't go through other nodes or cross over too often.

                          But if it doesn't do a good enough job, I don't know of any way to slightly tweak its output. As far as I know there's no way I can overrule its decisions about where to put the vertices, but still have it do the rest of the job for me like drawing all the edges. If I'm not 100% happy with its own choices, I have to do the whole thing myself instead.

                          Anyone know of a good interactive tool that will let me drag the vertices around, and automatically move the edges with them?

                          knu@toot.communityK This user is from outside of this forum
                          knu@toot.communityK This user is from outside of this forum
                          knu@toot.community
                          wrote last edited by
                          #12

                          @simontatham
                          yEd from yWorks might be an option.

                          Link Preview Image
                          yWorks - the diagramming experts

                          High-quality software components for graph analysis, automatic graph layout, and visualization.

                          favicon

                          yWorks, the diagramming experts (www.yworks.com)

                          1 Reply Last reply
                          0
                          • simontatham@hachyderm.ioS simontatham@hachyderm.io

                            Dear Lazyfedi, can anyone recommend a software tool for hand-directed graph layout?

                            If I have a graph (say, of a finite state machine or something), I can write it in Graphviz DOT format and feed it to xdot, which will do a complete job of layout: decide where the nodes go, figure out some nice curved paths for the edges so they don't go through other nodes or cross over too often.

                            But if it doesn't do a good enough job, I don't know of any way to slightly tweak its output. As far as I know there's no way I can overrule its decisions about where to put the vertices, but still have it do the rest of the job for me like drawing all the edges. If I'm not 100% happy with its own choices, I have to do the whole thing myself instead.

                            Anyone know of a good interactive tool that will let me drag the vertices around, and automatically move the edges with them?

                            jamey@toot.catJ This user is from outside of this forum
                            jamey@toot.catJ This user is from outside of this forum
                            jamey@toot.cat
                            wrote last edited by
                            #13

                            @simontatham It's been a bit since I last used it, but I think I remember https://www.drawio.com/ being usable for this purpose. (It looks like they're promoting an OpenAI integration at the top of their front page now, but at a quick glance I think the tool itself is still okay.)

                            1 Reply Last reply
                            0
                            • simontatham@hachyderm.ioS simontatham@hachyderm.io

                              Dear Lazyfedi, can anyone recommend a software tool for hand-directed graph layout?

                              If I have a graph (say, of a finite state machine or something), I can write it in Graphviz DOT format and feed it to xdot, which will do a complete job of layout: decide where the nodes go, figure out some nice curved paths for the edges so they don't go through other nodes or cross over too often.

                              But if it doesn't do a good enough job, I don't know of any way to slightly tweak its output. As far as I know there's no way I can overrule its decisions about where to put the vertices, but still have it do the rest of the job for me like drawing all the edges. If I'm not 100% happy with its own choices, I have to do the whole thing myself instead.

                              Anyone know of a good interactive tool that will let me drag the vertices around, and automatically move the edges with them?

                              pulkomandy@mastodon.tetaneutral.netP This user is from outside of this forum
                              pulkomandy@mastodon.tetaneutral.netP This user is from outside of this forum
                              pulkomandy@mastodon.tetaneutral.net
                              wrote last edited by
                              #14

                              @simontatham not exactly an interactive tool, but msc-generator has a "block diagram" mode where you describe positional constraints for nodes and edges in the source file (align a node to the top of another, put it below, to the left, ...).

                              If you're ok with closed source tools, yWorks yED may do what you want. Place the nodes manually and then use Layout->Edge Routing with one of the proposed algorithms

                              1 Reply Last reply
                              0
                              • simontatham@hachyderm.ioS simontatham@hachyderm.io

                                Dear Lazyfedi, can anyone recommend a software tool for hand-directed graph layout?

                                If I have a graph (say, of a finite state machine or something), I can write it in Graphviz DOT format and feed it to xdot, which will do a complete job of layout: decide where the nodes go, figure out some nice curved paths for the edges so they don't go through other nodes or cross over too often.

                                But if it doesn't do a good enough job, I don't know of any way to slightly tweak its output. As far as I know there's no way I can overrule its decisions about where to put the vertices, but still have it do the rest of the job for me like drawing all the edges. If I'm not 100% happy with its own choices, I have to do the whole thing myself instead.

                                Anyone know of a good interactive tool that will let me drag the vertices around, and automatically move the edges with them?

                                bazzargh@hachyderm.ioB This user is from outside of this forum
                                bazzargh@hachyderm.ioB This user is from outside of this forum
                                bazzargh@hachyderm.io
                                wrote last edited by
                                #15

                                @simontatham funnily enough I was solving this problem in work on monday (for a simpler issue); I was doing aws architectural diagrams using the python diagrams library (which is graphviz underneath). The diagrams are ugly because there's no constraints to say, these boxes should be on the same row or the same size. I ended up coding a table-based layout.

                                Edges are more complex; to sidestep that issue entirely I use arcs of a circle (scaled so the centre of the arc would be one point of an equlateral triangle with the centres of the two connected boxes), then only draw the portion of the arc which doesn't intersect with the two boxes.

                                Obviously that doesn't curve round things but since the boxes are all straight lines the edge curves are visually distinct, and since their curvature depends on the length of the edge the curves don't end up colinear either

                                It seemed like some kind of constraint system would have been better (enforce some equality constraints on boxes, add some control points on edges and have them avoid each other too) but too much effort

                                simontatham@hachyderm.ioS 1 Reply Last reply
                                0
                                • bazzargh@hachyderm.ioB bazzargh@hachyderm.io

                                  @simontatham funnily enough I was solving this problem in work on monday (for a simpler issue); I was doing aws architectural diagrams using the python diagrams library (which is graphviz underneath). The diagrams are ugly because there's no constraints to say, these boxes should be on the same row or the same size. I ended up coding a table-based layout.

                                  Edges are more complex; to sidestep that issue entirely I use arcs of a circle (scaled so the centre of the arc would be one point of an equlateral triangle with the centres of the two connected boxes), then only draw the portion of the arc which doesn't intersect with the two boxes.

                                  Obviously that doesn't curve round things but since the boxes are all straight lines the edge curves are visually distinct, and since their curvature depends on the length of the edge the curves don't end up colinear either

                                  It seemed like some kind of constraint system would have been better (enforce some equality constraints on boxes, add some control points on edges and have them avoid each other too) but too much effort

                                  simontatham@hachyderm.ioS This user is from outside of this forum
                                  simontatham@hachyderm.ioS This user is from outside of this forum
                                  simontatham@hachyderm.io
                                  wrote last edited by
                                  #16

                                  @bazzargh hmmm, the mention of a constraint system makes me suddenly remember @mjd's old blog posts about "linogram" and wonder if that could do anything like this job!

                                  1 Reply Last reply
                                  0
                                  • maehw@chaos.socialM maehw@chaos.social

                                    @simontatham do you know about PlantUML? Or is that the wrong direction of tooling?

                                    uep@timeloop.cafeU This user is from outside of this forum
                                    uep@timeloop.cafeU This user is from outside of this forum
                                    uep@timeloop.cafe
                                    wrote last edited by
                                    #17

                                    @maehw @simontatham yeah I've used plantuml for this kind of thing. It's not "drag and place a few things then let it figure out the rest", but you can set weights and stretchiness of the lines, and constrains like nodes that have to be in the same row, to get what you need.

                                    It can be a little unstable still.. get it just right then change a text label and suddenly everything flips to a different solution, but it's good at maintaining the rules for the kind of diagrams it knows how to draw.

                                    If you're a vscode user, there's a plugin that does live rendering as you type, which makes tweaking much easier

                                    1 Reply Last reply
                                    0
                                    • simontatham@hachyderm.ioS simontatham@hachyderm.io

                                      Dear Lazyfedi, can anyone recommend a software tool for hand-directed graph layout?

                                      If I have a graph (say, of a finite state machine or something), I can write it in Graphviz DOT format and feed it to xdot, which will do a complete job of layout: decide where the nodes go, figure out some nice curved paths for the edges so they don't go through other nodes or cross over too often.

                                      But if it doesn't do a good enough job, I don't know of any way to slightly tweak its output. As far as I know there's no way I can overrule its decisions about where to put the vertices, but still have it do the rest of the job for me like drawing all the edges. If I'm not 100% happy with its own choices, I have to do the whole thing myself instead.

                                      Anyone know of a good interactive tool that will let me drag the vertices around, and automatically move the edges with them?

                                      yadt@tech.lgbtY This user is from outside of this forum
                                      yadt@tech.lgbtY This user is from outside of this forum
                                      yadt@tech.lgbt
                                      wrote last edited by
                                      #18

                                      @simontatham

                                      This problem has bugged me for decades.

                                      I'm beginning to assume it's not actually as easy to solve as I think it should be.

                                      1 Reply Last reply
                                      0
                                      • simontatham@hachyderm.ioS simontatham@hachyderm.io

                                        Dear Lazyfedi, can anyone recommend a software tool for hand-directed graph layout?

                                        If I have a graph (say, of a finite state machine or something), I can write it in Graphviz DOT format and feed it to xdot, which will do a complete job of layout: decide where the nodes go, figure out some nice curved paths for the edges so they don't go through other nodes or cross over too often.

                                        But if it doesn't do a good enough job, I don't know of any way to slightly tweak its output. As far as I know there's no way I can overrule its decisions about where to put the vertices, but still have it do the rest of the job for me like drawing all the edges. If I'm not 100% happy with its own choices, I have to do the whole thing myself instead.

                                        Anyone know of a good interactive tool that will let me drag the vertices around, and automatically move the edges with them?

                                        abrasive@digipres.clubA This user is from outside of this forum
                                        abrasive@digipres.clubA This user is from outside of this forum
                                        abrasive@digipres.club
                                        wrote last edited by
                                        #19

                                        @simontatham graphviz actually included a GUI editor, 'dotty', which can open .dot files and lets you drag nodes around. Unfortunately saving them doesn't save the positions but perhaps this wouldn't be hard to add? It uses a very old DSL they have since retired though so depends how game you are feeling. Just compiled graphviz 2.59.1 and had a working dotty at least

                                        1 Reply Last reply
                                        0
                                        • simontatham@hachyderm.ioS simontatham@hachyderm.io

                                          Dear Lazyfedi, can anyone recommend a software tool for hand-directed graph layout?

                                          If I have a graph (say, of a finite state machine or something), I can write it in Graphviz DOT format and feed it to xdot, which will do a complete job of layout: decide where the nodes go, figure out some nice curved paths for the edges so they don't go through other nodes or cross over too often.

                                          But if it doesn't do a good enough job, I don't know of any way to slightly tweak its output. As far as I know there's no way I can overrule its decisions about where to put the vertices, but still have it do the rest of the job for me like drawing all the edges. If I'm not 100% happy with its own choices, I have to do the whole thing myself instead.

                                          Anyone know of a good interactive tool that will let me drag the vertices around, and automatically move the edges with them?

                                          rhempel@mstdn.caR This user is from outside of this forum
                                          rhempel@mstdn.caR This user is from outside of this forum
                                          rhempel@mstdn.ca
                                          wrote last edited by
                                          #20

                                          @simontatham You can often the "help" Graphviz layout engine by grouping so e nodes with invisible boxes, or forcing a primary layout direction or messing with node order.

                                          Some time ago, I let my desire to move the boxes around succumb to the need to have the drawing at all.

                                          Personally, I value an easily editable and diffable drawing specification over a pretty drawing.

                                          1 Reply Last reply
                                          1
                                          0
                                          • R relay@relay.infosec.exchange shared this topic
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups