Graph view settings to move node clusters into better positions?

Are there graph view settings that would correct a problem that I am seeing below?

The default graph view for one of my vaults in unclear. I can drag nodes around to make it clearer manually. Obsidian restores the default view whenever I reopen the vault.

Example before manual adjustment:

Same example after manual adjustment:

The specific problem is easier to see if we zoom in on a smaller example from the same graph. Here is one cluster of nodes (with the forces set to make the problem obvious):

This graph has two “wings” or “nodes” that cross over one another unnecessarily. This arrangement is clearer:

It appears as though the nodes are trapped in positions that force the relationship lines to cross. The graph can’t “untwist” itself once generated this way. Are there settings that would either prevent these twists or, once created, force the nodes out of them? Something that makes Obsidian “strongly opinionated” that relationship lines shall not overlap unless it is unavoidable?

My hope is that solving for this case will untangle the whole graph.

Things I have tried

  • Fiddling with the graph view force sliders. (Hoping I just haven’t stumbled over the right combination.)
  • Hiding/showing different node types (vault paths) to see if these allow Obsidian to generate a clean node graph before popping the hidden nodes back into view. (Even worse!)
  • Researching the settings in yEd that explicitly reduce the likelihood of edges overlapping to see if any of that translates to Obsidian’s force settings. (Admittedly, I can only do that outside work hours and it’s hard to keep the pieces together mentally over several days.)
  • Google searches. (Found a lot of obsidian stone jewelry.)

What I’m trying to do

I’m trying to find settings for Obsidian’s graph view so that the edges do not cross unnecessarily, in order to make the graph more legible.


Edge routings that minimise ‘edge crossing’ are quite hard to implement in real-time. Even yEd and graphViz algorithms tailored to this specific case take some seconds to calculate even for medium sized graphs. There is a community plugin called ‘Juggle’ available that adds some extra graph layout options to Obsidian, but I’m not sure about edge routing/bundling options.

In plain Obsidian, a layouting ‘trick’ I use to reveal and tidy up clusters is setting the central gravity to 0 and sliding the 3 bottom sliders from left to right to see how the graph expands/contracts around certain nodes. Remember, there is no ‘perfect’ graph layout, as compressing high dimensional data into a flat plane requires some concessions to be made.

1 Like

Thanks, @demeneer. I’ll try both those approaches out. It also helps to know that minimizing edge crossing is tricky business.

You mentioned “tidying” clusters. I’ve noticed that when I move nodes manually they go back to their original order after Obsidian reloads. Is there a way to fix the position of the nodes relative to one another? Or how does Obsidian determine the initial node placement?

@demeneer, your recommendation to zero out the center force before manipulating the other forces has helped. The resulting graph is not always clearer, but even in those cases the movement of nodes makes the structure clearer. Thanks for the advice!


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.