LabCanvas

TikZ physics examples

Contents

Eighteen physics figures, almost all from Janosh Riebesell’s diagrams collection. The largest group is statistical and thermal physics: the Maxwell–Boltzmann speed distribution, ideal and van der Waals isotherms, an Otto cycle on a p–V diagram, critical temperature curves, spontaneous magnetisation, gas pressure on a wall and the Bose–Einstein distribution in 3D. There are also a Bloch sphere, scattering and detailed balance, Thomson scattering, four solid-state figures (a k-space lattice of states, the Seebeck effect, basis plus lattice equals crystal, a ferroelectric response), three field-theory sketches and a helicopter free-body diagram.

Seven of the figures are plots made with pgfplots, the plotting package built on TikZ. The Feynman diagram uses the TikZ-Feynman package and the Seebeck figure loads circuitikz; the others are plain TikZ with libraries such as calc, angles, quotes and decorations.markings.

Quantum & particles

Statistical & thermal

Waves & optics

Mechanics

Solid state & materials

Field theory

Using these figures

Every figure keeps its own licence: MIT or CC0 1.0, both of which allow use, change and sharing, commercial use included. The MIT licence asks that its copyright and permission notice go with copies of the code, so each figure’s code starts with its source, author and licence; keep those lines when you reuse it. The full licence texts are on the sources and licences page.

“Open in the TikZ editor” loads the figure’s complete document into the free TikZ editor, where it is typeset with TeX Live 2026 and you can change it and download a PNG. To compile it on your own computer, save the code as a .tex file and run pdfLaTeX (or the engine the tile names) on it; LabCanvas changed the files only where needed to make each one compile on its own, as its first lines say.

Other fields

More TikZ guides