Computing Library › Visualization & Interfaces
Visualization & Interfaces

Contour Plots

Contour lines connect points of equal value, showing a 2D scalar field's levels, gradients, and structure with precision.

Lines of equal value

A contour plot draws curves along which a 2D scalar field is constant, exactly like elevation contours on a topographic map. Where lines bunch, the field changes fast; where they spread, it is flat. Contours give precise level information that a smooth color wash alone cannot.

Filled and line contours

Kronos motion — open field lines

Line contours mark specific levels and read gradients well. Filled contours color the bands between levels, combining the value cue of a heatmap with the discreteness of contours. Using both, thin lines over a filled map, gives level precision and overall shape at once.

Choosing levels

Level selection shapes the story. Too few levels hide structure; too many clutter. Levels tied to physical thresholds (a boundary value, a critical pressure) make the plot interpretable. Logarithmic levels suit fields spanning many orders of magnitude.

Relation to isosurfaces

A contour is the 2D case of an isosurface; the 3D generalization uses marching cubes (see Isosurfaces). Contours on stacked slices are a lightweight way to convey a 3D field.

Kronos use

Poloidal flux is shown as nested contours in equilibrium cross-sections, where the closed contours are the flux surfaces and their spacing conveys the field gradient.