Note: this feature is experimental and the result is not undoable.
In map view, View ▸ Arrange ▸ Dance (⇧⌘-D) initiates an automated layout of the view based on a physical simulation. Each link among notes in the map is treated as a spring that pulls linked notes together. The effects of Dance are undo-able (but if trying this it is best to do so immediately after the Dance, so its top of the undo stack).
The behaviour of Dance is controlled by a pop-up shown when then the feature is invoked
All notes exert a gravitation attraction for other notes. Notes that overlap repel each other. Notes that are textually similar to each other attract each other. At the beginning of the simulation, each note is subject to a random force, much as if it were heated. The force is reduced progressively over time. This process, known as simulated annealing, helps the simulation from getting tangled up in local minima.
Each adornment that has one or more values of $ClusterTerms attracts notes in which those terms appear in the text. Adornments are otherwise ignored in the simulation.
Not all maps will benefit from automatic layout; for example, the famous (Storyspace) map of Mary-Kim Arnold's "Lust" does not due to its many inter-connections. Performance may be unsatisfactory in maps with more than a few dozen notes.
Dancing automatically stops when any note is dragged. Otherwise, the effect of the drag can impart a vast, unwanted acceleration to the dragged item.
If more than one note is selected, only the selected notes will be moved by the Dance command; this is very convenient when arranging a cluster of related notes in a large map.
If no note is selected, or only a single note it selected, then all unlocked notes are moved by the Dance command.
See also—notes linking to here: