Skip to content

Comparison ​

foresight sits between three families of tools: gnuplot and its front ends, which drive an external plotter; Fortran wrappers of gnuplot or matplotlib; and pure Fortran plotting libraries that write images. Its niche is the combination none of them covers: pure Fortran, interactive pages that need nothing to view, gnuplot usage, live monitoring.

foresightgnuplotfeedgnuplotogpf, gnufor, fplotpyplot-fortranfplotlibfortplot
Runtime dependencynone—gnuplot, PerlgnuplotPython + matplotlibnonenone (ffmpeg for video)
Language of the plotterFortranCgnuplotgnuplotPythonFortranFortran
Callable from Fortranyesnonoyesyesyesyes
gnuplot command languagesubsetfullthrough optionsfull (through gnuplot)nonono
Interactive zoom/panself-contained HTML pageown window; HTML page (canvas terminal)gnuplot windowgnuplot windowmatplotlib windownono
Live monitoring of files--watch: reloading pages that keep or follow the view; text redrawn in placereplot/reread loops--stream, scrolling window (--xlen)nononono
Terminal outputcharacters, Unicode blocks, Braille, ANSI colorsdumb, block, sixel graphicsthrough gnuplotthrough gnuplotnonoASCII
Static formatsSVGmanythrough gnuplotthrough gnuplotthrough matplotlibSVG, PNG, PDF, EPS, GIFPNG, PDF; video through ffmpeg
Functions of x (plot sin(x))yesyesyes (--equation)yesnonono
2D plot stylesevery gnuplot 2D style (lines to spider plots, heatmaps, polar); pies, gauges, readoutsallthrough gnuplotthrough gnuplotthrough matplotlibmanymany
Smoothing, histogramssmooth, 5 filterssmooth, 13 filters; binsthrough gnuplotthrough gnuplothistogramshistogramshistograms
3D, contours, fittingnoyesthrough gnuplotthrough gnuplotcontours, 3D; no fitcontours, 3D axes; no fitcontours, 3D lines; no fit

The rows on other projects summarise their documentation as of October 2026 (feedgnuplot, fplotlib, fortplot, pyplot-fortran, fplot); check them for their current state.

Closest relatives ​

  • gnuplot's canvas terminal writes an HTML page with mouse zoom, the nearest thing to a foresight page. It needs gnuplot to write it, and its helper scripts (canvastext.js, gnuplot_common.js) next to the page or at a URL (jsdir); a foresight page is one file, written by the Fortran program itself.
  • feedgnuplot is the closest to --watch: it pipes a stream into gnuplot and redraws it, with a scrolling window of the recent past. foresight watches files rather than a pipe — the job writes its log as it would anyway — and the viewer's follow mode (f) gives the same scrolling window in the page.
  • fplotlib and fortplot are pure Fortran like foresight, with raster output and 3D; they write images, not interactive pages, and read no gnuplot.

When to use something else ​

  • Publication figures with LaTeX typesetting and fine layout control: pgfplots, matplotlib.
  • Raster output (PNG), contours, maps or 3D from pure Fortran: fplotlib, fortplot.
  • The full gnuplot language (user functions and variables, fit, splot, splines): gnuplot itself.
  • Fields on meshes: ParaView through VTKFortran.