Appearance
Choosing a network layout means picking the algorithm that makes your graph readable: for most historical networks the answer is ForceAtlas 2 with "Prevent Overlap" enabled, falling back to Yifan Hu or OpenOrd when the graph grows past tens of thousands of nodes. A layout only sets node positions for legibility — it never changes your centrality scores or communities. So choose purely for clarity, tune scaling and gravity, then lock the figure.
This guide walks the decision and the tuning workflow end to end.
What is a layout algorithm doing?
Your edge list has no coordinates. A layout algorithm invents x,y positions so the structure is visible. Force-directed methods — the dominant family — model edges as springs pulling connected nodes together and all nodes as charges pushing apart. The system settles into a state where densely linked groups cluster and sparsely linked ones drift apart, making communities visible.
Which layout fits which situation?
| Layout | Best for | Trade-off |
|---|---|---|
| ForceAtlas 2 | General use, clear communities | Slows past ~50k nodes |
| Fruchterman-Reingold | Small, tidy graphs | Cramps large networks |
| Yifan Hu | Large networks, fast | Weaker cluster separation |
| OpenOrd | Very large, clustered | Hard, less organic look |
| Circular / Radial | Showing hierarchy or order | Hides community structure |
For a correspondence or kinship network of a few thousand nodes, ForceAtlas 2 is almost always the right call.
How do I tune ForceAtlas 2?
Run it and adjust three controls in this order:
- Scaling — raise it (e.g. 10 → 50) to spread a cramped graph; lower it to pull an exploded one together.
- Gravity — increase to stop loosely connected nodes drifting off-screen; decrease if everything collapses to the centre.
- Prevent Overlap — enable near the end so labels stop colliding.
Let the simulation settle (motion slows to a crawl) before judging, then Stop. A useful sequence:
text
1. Run ForceAtlas 2, Scaling = 10, Gravity = 1.0
2. Watch until it spreads, then enable LinLog mode for tighter clusters
3. Tick Prevent Overlap
4. Stop, then size nodes by degree for the final figureLinLog mode (a checkbox) emphasises community separation and is excellent for historical group structure.
Does the layout affect my results?
No — and this matters. Layout changes only visual position. Centrality, degree, modularity and community assignments are computed from the graph's connections, not its coordinates. A betweenness score is identical whether you use ForceAtlas 2 or a circular layout. Never tweak a layout to "improve" a metric; choose it solely for readability.
How do I handle a very large network?
Past tens of thousands of nodes, ForceAtlas 2 gets slow. Two strategies:
- Switch algorithm: run Yifan Hu or OpenOrd for the coarse global structure, then refine a region with ForceAtlas 2.
- Reduce the graph: filter to the giant connected component, or apply a degree threshold (e.g. keep nodes with degree
>= 2) before laying out.
In NetworkX you can pre-filter and use a layout, then export positions to Gephi:
python
import networkx as nx
H = G.subgraph([n for n, d in G.degree() if d >= 2])
pos = nx.spring_layout(H, seed=7) # reproducible with a seedHow do I make a figure reproducible?
Force-directed layouts start from random positions, so each run differs. To reproduce a figure: record the algorithm and parameters, set a seed where the tool allows (NetworkX's spring_layout(seed=...)), and save the Gephi project file, which stores exact node coordinates. Without the project file, you cannot recreate the same picture later.
Key Takeaways
- ForceAtlas 2 with Prevent Overlap is the best default for historical networks.
- Tune scaling first, then gravity, then enable overlap prevention last.
- Use LinLog mode to sharpen community separation.
- Layout sets positions only; it never changes centrality or communities.
- For very large graphs, use Yifan Hu or OpenOrd, or pre-filter the network.
- Save the project file and record parameters to make a figure reproducible.
Frequently Asked Questions
What does a network layout algorithm actually do?
A layout algorithm assigns each node an x,y coordinate so the graph is readable, since the raw data contains no positions. Force-directed layouts treat edges like springs and nodes like repelling particles to reveal clusters and structure.
Which layout should I use by default in Gephi?
ForceAtlas 2 with 'Prevent Overlap' enabled is the best general-purpose default for historical networks. It separates communities clearly, scales to tens of thousands of nodes, and exposes useful tuning like scaling and gravity.
Why do my nodes overlap or fly apart?
Overlap means you have not enabled the prevent-overlap option or the scaling is too low; nodes flying apart means gravity is too weak or scaling too high. Adjust scaling first, then gravity, and let the layout settle before judging.
Does the layout change my analysis results?
No. Layout only affects visual position, not metrics like centrality, degree or community membership. Two different layouts of the same graph yield identical statistics, so choose a layout purely for readability, not to change findings.
How do I lay out a very large network?
Use a fast scalable layout such as Yifan Hu or OpenOrd for tens of thousands of nodes, then refine locally with ForceAtlas 2. Pre-filtering to a giant component or a degree threshold also makes large graphs far more legible.
Should I use a deterministic or random layout?
Most force-directed layouts start from random positions, so results vary between runs. For a reproducible figure, note the algorithm and key parameters, and save the project file so the exact node positions are preserved.