Force Directed layout, distance between shapes setting not (really) working

I am working with a diagram layout with a large number of shapes (over 2000). I want to use force directed layout, this is the initial result:

The layout settings used for this image:
Screen Shot 2021-10-17 at 3.15.09 PM

To improve the result, I though that bottom slider might help but moving the slider just by a hair explodes the diagram resulting into:

Slider setting:
Screen Shot 2021-10-17 at 3.16.28 PM

Bug? Or anything I missed?

I wonder if OmniGraffle is the right tool to reach for at this scale ?

  • You might find more flexibility and control in using directly. (OmniGraffle’s layout is a wrapper around a subset of graphviz),
  • and you might get a more direct connection between data updates and display by using, or the related notebook system at

(The latter two will give you higher graphic quality than graphviz itself)

1 Like

Thanks for the reference @draft8 - the diagram is created automatically with a python script I wrote that spits out omnijs. I have a (simple) layout engine in the python script and rather just wanted to capitalize on what is built-in OG. Switching to something else might be valid, yet this bottom slider for this graph does nothing smart and is a problem it seems and therefore is interesting in addressing by itself.

It probably means I need to update my python to accommodate my needs (which is fine) - still perhaps something for omni to fix.

Surprisingly, OG is not too bad handling this many shapes (panning is responsibly fast, zooming is a bit clumsy but not screamingly stupid).

1 Like

Agreed. This should be a bug fix request.

Historically (from OG V5.x onwards) the Auto-Layout has been silly: it works on simple diagrams, but it is hopeless with large diagrams. So the feature request (as opposed to the bug fix request above) is to implement Auto-Layout properly.

In OG 4.x, the Auto-Layout used to work from a Style file (OG document, much like a Template file). We have lost that. Now it works from the options in the Inspector only.

For what its is worth. Up to and including OG V4.x, I actually drew my complex models in OG, and used a script to read the OG file and “spit out” SQL code. Not possible after V5, due to the file not being Normalised, or reasonably useful. So now, just like you, I draw my code-related diagrams is something else.


This whole thread has me intrigued - as I have my own “tree of nodes” stuff that Python (and sometimes PHP / javascript) emit. I don’t want to be manually laying mine out, either.

Fortunately my use cases range from the handful of nodes to a few hundred.

I would endorse GraphViz .dot file format as an easy one to confect. (In fact one of my open source projects, written in Python, does this.)

Another possibility is to create CSV and pull into iThoughts. (My aforementioned project filterCSV works in this area.) The CSV flavour that iThoughts uses is rather nice.

If you can separate the “tree data structure construction” phase from the “emit text” phase in your code I think that will help you. I realise this is unsolicited advice - and you’re probably already doing it.

But I do agree, it would be nice if OmniGraffle - which I also use - got it right.

1 Like

Yes, the data pipeline consist of several steps, spitting out several CSV files along the way :-). The data above is part of a dog pedigree analysis I am doing (32000 dogs), looking at various (dog) parameters. Commonly, different visualizations brings out particular aspects more clearly than others. I did write some python to create a typical, strict pedigree layout but find that a force or circular directed layout may work better in some cases. I am considering writing my own since OG is failing here.

What is nice with OG is that the labor intense part can be done in code and the finicky little customizations are easily done by hand (which would cost tons of time in code). As long as OG can do the overall layout, I am fine with making customizations.

I accept that this is a special case and the folks at Omni probably don’t want to be bothered with it. On the other hand, they did sort of provoke all this by adding all the cool automation through omnijs. I always found OG an OK-ish drawing tool but with the automation it has become an important visualizer in many projects for me.

1 Like

Exactly. I have no problem with the auto-layout being less than perfect, I have my own grid and other considerations such that making the “finicky” adjustments to serve that, is no problem at all.

I think that they should be bothered, and that they are bothered.

I want the functionality that I lost between OG4 and OG5: performing auto-layout from a DiagramStyle document. For my needs, it was better that the auto-layout in OG5 because I had way more control, and less “finicky” adjustments to make. (That is not to say that the overall auto-layout in OG5 is not good.)

Just that the whole notion of the DiagramStyle doc is gone.

OmniGraffle 4

  1. Make a diagram that is intended to demonstrate the Layout Style

  2. Save it as a Diagram Style:

  3. The Diagram Layout Inspector
    Which was perfectly fine for that day and age, and for most auto-layouts
    Shown for contrast
    I am not using this:

  4. When Auto-Layout is required, reference the desired DiagramStyle, and then check the box Auto lay out diagram.

Current or Future Version

I am not saying that the lost concept of DiagramStyle doc must be reinstated. Desirable but not essential. I appreciate that GraphViz or whatever is a better library to include into OmniGraffle, and that its auto-layout capabilities are better in general than OG4 or OG5.

I am saying the auto-layouts in OG5 and beyond are silly, not as good re precision, and that they must be improved to supply all commonly-used layout needs. Yours and Martin’s included in that. Again it does not have to be perfect, having to make “finicky” manual adjustments is fine.

  • At second-best, it will include a Hierarchy, indented, as with the common Table of Contents in a textbook.

  • At best, some functionality along the lines of OG4 DiagramStyle. Perhaps imported from a GraphViz doc.


1 Like

My interactions with omni staff have not been impressive. I cannot wait for omni to do something positive here, nor do i understand why functionality was dropped since V4/5. Still, lets hope you are correct and i am just a negative old bastard :-)

Agreed. Support and interaction were great up to V4, it has dropped off badly since then.

That is mind-boggling. I still can’t believe that a s/w company removes functionality, without discussion or notice. When I complained they said “we did not know anyone used it”, which is a hysterically stupid thing for a app provider to say.

I will not pay more (eg. for V6 and V7) to obtain less functionality than I have, which is why I remain on V5. I appreciate that there is new functionality in V6 and V7, but that is not a fair exchange.

And believe me, there is more functionality that has been lost, the Diagram Style doc is just one. There are worse losses.

Sorry. I did not mean that you should wait, definitely not. They are slow, and there is no commitment. Go ahead with your coding.

The purpose of my post above was to demonstrate another method for auto-layout, not limited to GraphViz, for anyone who is planning on writing code (omnijs or AppleScript or ETL from the data file [which is what I used to do] ).

And perhaps for Omni staff to consider for future versions, if they bother to read the forums.