Skip to content

Tutorial ​

The tutorial follows one job from its first plot to a live dashboard: a pretend flow solver whose residuals fall over the iterations while its drag coefficient settles. Each chapter is a complete program or script of docs/examples/src; every plot on these pages is the page it wrote, live — zoom it.

ChapterYou learn
1. A first plotfigure_object: plot arrays, label the axes, save HTML and SVG
2. Styles and the keycolors, widths, dash and point types; the key inside or outside
3. Axeslog scale, grid, ranges, tick steps and label formats
4. From the log, with a scriptthe solver log and a gnuplot script; using, every, '', -e
5. CSV and expressionsseparators, columns by header name, values computed per row, gaps
6. Two axes and a modelthe second y axis; functions of x sampled over the data
7. A dashboardmultiplot layouts, error bars, an inset
8. Watching the run--watch, the reloading page, the text terminal over ssh

Chapters 1–3 use the Fortran library, 4–8 the command line: the two are the same engine, a script is what a program writes through figure_object calls, line by line.

Then ​

The Cookbook answers one task per recipe; the Reference covers every command and method.

Running the examples ​

bash
bash scripts/docs_examples.sh

builds the library and the command line, compiles and runs every example, and regenerates the snippets, outputs and plots these pages include. Every plot is drawn twice, in the washi theme for the light mode of these pages and in the night theme for the dark mode (FORESIGHT_THEME): the switch at the top of the page shows the other. The CI runs it too and fails if any of them differs from the committed one.

Released under the GPL v3, BSD 2-Clause, BSD 3-Clause or MIT License.