# Explore the graph

[Wiki](../README.md) / [Station](README.md)

The Graph view draws the nodes and relationships in a result and lets you walk out from
them a page at a time, measure what you see and keep a view to open again. It works the
same way as [Explorer's graph](../explorer/graph.md). From Station 0.7.0.

## The canvas

Scroll to zoom, drag the background to pan and use **Fit** to see everything. Drag a node to
pin it. **2D** and **3D** switch layouts; in 3D, Shift+drag orbits the camera and **Depth**
sets the perspective.

Click **Physics** in the canvas's top right corner to open four sliders that stay in view
while you work: **Repel** (how hard nodes push apart), **Attract** (how hard a relationship
pulls its two nodes together), **Link length** (the length relationships are pulled towards)
and **Centre pull** (how hard everything is drawn to the middle). The graph moves as you
slide. Click **Physics** again to fold them away. Nodes never rest on top of each other. From
Station 0.9.2.

The sliders belong to the query tab, so three tabs can show three graphs arranged three ways,
and they last until the tab closes. Every tab starts from the forces in **Settings › Graph
physics**. **Reset** puts a tab back on those, and **Save as default** makes the tab's forces
the ones every graph starts with.

The graph shows up to 1,000 nodes. **Limit** in the graph toolbar sets 300, 500, 1,000, 2,000
or 3,000; the line under the canvas says when a result has more than the limit, and **Table**
and **JSON** keep all of it.

Nodes from a query, an expand or an insight are joined by any relationships between them.
**Relationships** shows or hides every relationship while the layout still follows them,
and above 400 relationships their type labels are left off.

## Expand a page at a time

Double-click a node to load its next 50 neighbours, and again for the next 50, until every
relationship is drawn. Alt+double-click collapses what came in through it. Turn on **Style →
Show hidden relationship counts** to see a badge such as `+1.8k` on each node: its
relationships that are not drawn yet.

Select a node and the right-hand panel shows a **Neighbours** breakdown: its relationships
by direction, type and the label at the other end, with how many are drawn and a **+50**
button for each group. **Load 50 more**, **Collapse** and **Hide** sit with **Edit**, **Link**
and **Delete**.

## Right-click a node

Right-click a node for **Focus** (only that node stays), **Focus with neighbours** (the node,
the nodes drawn next to it and the relationships between them), **Load 50 more neighbours**,
**Collapse**, **Select neighbours**, **Shortest path** from the selected node, **Pin** or
**Unpin**, and **Hide**. After **Find in view** picks out a node, Focus clears everything else
away; Ctrl+Z brings it back.

## Selection

Click a node to select it; Shift+click (Ctrl+click in 3D) adds more, Ctrl+A selects
everything, and clicking a label in the legend selects that label; click **Legend** to fold
it away. The bar along the bottom of the canvas then offers **Expand**, **Collapse**, **Hide**, **Keep only**, **Keep +
neighbours**, **Pin**,
**Unpin**, **Shortest path** (between two selected nodes, up to 8 hops) and **To editor**.
Delete hides the selection and Esc clears it.

**Find in view** fades every node whose labels and values do not contain the text; `#42`
finds node 42, and Enter selects the matches. **↶ Undo** (Ctrl+Z) steps back through the
last 25 changes to the canvas.

## Style

**Style** opens a small window that stays beside the graph while you choose. It sizes nodes
by database degree, degree in view, PageRank, betweenness or a number property, and colours
them by label, database degree, Louvain community, connected group, PageRank, betweenness or
any property. It also lists the top 10 nodes by the chosen measure. Measures other than
database degree use what is on the canvas.

## Insights

**Insights** analyses the whole database: **Labels** (nodes, degrees and unconnected nodes per
label), **Hubs**, **PageRank**, **Components** (separate islands, largest and smallest) and
**Communities**. Results open in a new query tab, or add a single node to the graph. Small
components are often orphaned records. PageRank, Components and Communities build a
temporary in-memory projection and drop it when they finish.

## Saved views

**Views** saves the nodes on the canvas, where they sit and the style under a name, for the
connection you are using. Opening one runs a query for those nodes in a new tab and puts
them back where they were, with current data. Station keeps up to 30.

## Related articles

[Write and run queries](queries.md) · [Keyboard and mouse](keyboard.md) · [Style, insights and saved views in Explorer](../explorer/insights.md)
