Skip to content

Piero Bosio Social Web Site Personale Logo Fediverso

Social Forum federato con il resto del mondo. Non contano le istanze, contano le persone

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

Uncategorized
27 21 1
  • @simontatham do you know about PlantUML? Or is that the wrong direction of tooling?

    @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

  • 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

    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.

  • 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 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

    edit: I thought it handled updating curved edges automatically but alas, I was wrong, sorry!

  • 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 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.

  • 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 pretty sure there's a way to run graphiz that just adds the vertex location information to the dot file, and you can modify those by hand, and then generate the image.. I don't remember how.. try -Tdot maybe? https://graphviz.org/docs/outputs/canon/

  • 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 how complex of a graph, and is the interactive portion a hard requirement? I'm slightly biased towards TiKZ, as it lets me define nodes, edges, and their attributes declaratively. It's not exactly interactive, but if you have a decent LaTeX editor then at least you can see the result of your graph declaration quickly, and I find that it minimizes the amount of tinkering I need to do while constructing charts. There are also markdown-targeted libraries like Mermaid that claim to do the same. I don't particularly like them, but I'd be negligent if I didn't at least mention them.

    For truly interactive tools you're probably going to need to dip into commercial solutions. Visio is the classic offering for Microsoft systems. OSX's equivalent is OmniGraffle. And the online equivalent is Lucidchart.

  • 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 perhaps not exactly the answer to your question, but spytial[https://github.com/sidprasad/spytial] allows you to specify layout constraints that are dispatched to an smt solver and generates diagrams that obey those layout constraints. Probably a bit more work on your side as you’d have to specify what constraints you want, but it’s a pretty low effort tool for what it achieves. It also allows you to drag stuff around and restructures the diagram to ensure it maintains the constraints. I’ve personally not used it for anything but small examples and demos, but it looks promising!

  • @simontatham how complex of a graph, and is the interactive portion a hard requirement? I'm slightly biased towards TiKZ, as it lets me define nodes, edges, and their attributes declaratively. It's not exactly interactive, but if you have a decent LaTeX editor then at least you can see the result of your graph declaration quickly, and I find that it minimizes the amount of tinkering I need to do while constructing charts. There are also markdown-targeted libraries like Mermaid that claim to do the same. I don't particularly like them, but I'd be negligent if I didn't at least mention them.

    For truly interactive tools you're probably going to need to dip into commercial solutions. Visio is the classic offering for Microsoft systems. OSX's equivalent is OmniGraffle. And the online equivalent is Lucidchart.

    @claus TikZ is actually what I'm going to want to end up with, so any other output format will need to be translated into it in the end anyway! But I want to quickly try out a lot of layouts until I find one that's clear, before I hand-code a TikZ representation of it.

    The kind of graph size I have in mind is something along these lines:
    https://www.chiark.greenend.org.uk/~sgtatham/quasiblog/aperiodic-transducers/#p2-transducer
    It won't be that exact graph, but it will be a couple of graphs of that general size and complexity.

    In particular there will probably be a fundamental symmetry of the graph which I'll want the layout to reveal rather than obscuring. (That's true of this example too, but you can't see it at all in the tangle Graphviz made!)

  • oblomov@sociale.networkundefined oblomov@sociale.network shared this topic
  • @claus TikZ is actually what I'm going to want to end up with, so any other output format will need to be translated into it in the end anyway! But I want to quickly try out a lot of layouts until I find one that's clear, before I hand-code a TikZ representation of it.

    The kind of graph size I have in mind is something along these lines:
    https://www.chiark.greenend.org.uk/~sgtatham/quasiblog/aperiodic-transducers/#p2-transducer
    It won't be that exact graph, but it will be a couple of graphs of that general size and complexity.

    In particular there will probably be a fundamental symmetry of the graph which I'll want the layout to reveal rather than obscuring. (That's true of this example too, but you can't see it at all in the tangle Graphviz made!)

    @simontatham I see. In that case the least effort approach would likely be Lucidchart. I did a quick check and they offer a 7 day trial, which might be enough to learn the ropes and play around with your diagram.

  • 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 there IS some amount of control that the user can exert on how things are placed and arcs are drawn (ranks etc). Depending on your specific needs this may or may not be sufficient

  • @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.

    @loopspace @simontatham Yeah, I think this is the easiest way: of you ask for output in dot or xdot format (using -Tdot or -Txdot on the command line), you get position information which you can then tweak.


Gli ultimi otto messaggi ricevuti dalla Federazione
Post suggeriti
  • 0 Votes
    1 Posts
    0 Views
    Film d'animazione di 98 minuti, senza dialoghi?Stamattina ho osato ed ero sinceramente preoccupato!Avevo molti dubbi in merito alla tenuta, invece з ragazzз, che generalmente dimostrano avere una soglia dell'attenzione molto bassa, sono rimasti attenti tutto il tempo, posticipando di cinque minuti l'intervallo e, a fine "proiezione", hanno anche applaudito!!!Incredibile!!! Piccole gioie 😍Comunque consigliatissimo!Unico difetto, traduzione di titolo pessima, direi (distrugge anche l'omaggio ad Asimov)#scuole #lezione #cinema #film #filmanimazioneIl mio amico Robot - Robot dreams - RaiPlayhttps://www.raiplay.it/programmi/ilmioamicorobot-robotdreams
  • Okey, FINAL ROUND!

    Uncategorized
    3
    1
    0 Votes
    3 Posts
    0 Views
    @shinmera The bottom is very BAM
  • Here's a nice C puzzle this evening.

    Uncategorized
    4
    0 Votes
    4 Posts
    1 Views
    @keithp my go-to for these questions is cppreference, andhttps://en.cppreference.com/w/cpp/string/wide.html#Typesdefines wint_t as «wint_t integer type that can hold any valid wide character and at least one more value(typedef)»whereas for wchar_thttps://en.cppreference.com/w/cpp/language/types.html#Character_typeswchar_t — type for wide character representation [...]so wint_t should never be smaller than wchar_t, if my reading is correct.
  • This is a scheduled post!

    Uncategorized
    2
    0 Votes
    2 Posts
    0 Views
    @samerion ouch, sounds like a bug! Can you open a bug report on our github repo please? 😬