Skip to content

Feature map ​

Everything foresight does, and where it is documented. The tutorial shows it at work; the cookbook one task at a time.

AreaFeaturesWhere
Plot styleslines, points, linespoints, impulses, steps, fsteps, histeps, dots, yerrorbars, xerrorbars, xyerrorbars, yerrorlines, xerrorlines, xyerrorlines, boxerrorbars, boxxyerror, candlesticks, financebars, boxplot (quartiles, factors, outliers), vectors, arrows, ellipses, polygons, labels, sectors, parallelaxes, spiderplot (set paxis), boxes, filledcurves (bars from 0, bands, x1, x2, y1, y2, x=V, xy=, above/below; fill styles and patterns, set boxwidth), histograms clustered, with error bars, row- and column-stacked, in groups (newhistogram), with xtic(N) category labels; gnuplot linetype colors (set colorsequence default|podo|classic, and foresight's categorical orders), colors per point (lc variable, lc rgb variable) and from the palette (lc palette z|cb V|frac F), dash types, widths, 15 point types and sizes, pointinterval; set style line, ls; set errorbars caps and lines; set linetype, set pointsize, set jitter swarms, set timestampgnuplot Subset, colors per point, point types
Axeslinear and log scales, fixed or autoscaled ends extended to the ticks, reversed ranges; tick steps, mirror, set offsets, printf label formats and gnuplot's powers and prefixes (10^{%T}, %s %c), tick label offset and color, ticks on the axes (axis), range frames (rangelimited); a second y axis, a second x axis; time axes (set xdata time, set timefmt, gnuplot's time ticks and invented labels, set mxtics time N units); text labels from the data on any axis (xtic, x2tic, ytic, y2tic); set tics options and scale, set grid lines and style, zero axes, border style, margins, set autoscaleTicks, Second y axis, Second x axis, Time data
3D plotssplot of functions (set isosamples), data (using x:y:z, scans and datasets), matrix, the matrix binary and binary arrays; set view (rotation, scale, equal xy|xyz, azimuth), set view map and projection xy|xz|yz; set xyplane, set mapping spherical|cylindrical; meshes with set hidden3d (gnuplot's painter order); set contour (base, surface, both; cntrparam, cntrlabel, contour labels); set dgrid3d of scattered data, masks; voxel grids (set vgrid, vfill, voxel(), with isosurface); HTML pages turn the view with the mouse3D plots, 3D views, Contours, Voxel grids, Turning a 3D view
3D surfacespm3d in maps and 3D views (at b|s|t, gnuplot's scan order, depthorder [base], interpolate, corners2color, clip z|1in|4in, borders), set pm3d lighting and spotlight, with contourfill (set contourfill), with zerrorfill, with boxes in 3D (set boxdepth), with polygons, set object N polygon depthorder (2-sided colors), set wall; the color box of 3D views3D views, Cookbook
Annotationsset label, set arrow, set object rectangles, circles, ellipses, polygons, in first, second, graph, screen or character coordinates (label and title offsets too, projected through the view in 3D), front or back; arrow styles (set style arrow, as N), set style rectangle, dashed bordersLabels, arrows and objects
Textgnuplot's enhanced text, on by default in scripts: x^2, T_{n-1}, {/Symbol a}, {/=16 ...}, {/:Bold ...}, @, &, ~, escapes; noenhanced per text; the viewer's zoomed tick labels tooEnhanced text
Keyinside (any corner, centred), outside, below/above in rows, the margins (lmargin, rmargin, tmargin, bmargin), at a position (data, graph or page coordinates), box, opaque; reverse, Left, invert, samplen, spacing, width, height, maxrows, maxcols, textcolor, box line style, offset, a title; titles as written, from column headers, or noneKey
Data fileswhitespace, CSV or any separator; comments, blocks, datasets; using, index, every; column 0; missing values; cells read as gnuplot (C strtod); gnuplot's binary files (matrix binary, format= records, record, skip, endian, data arrays)Data Files, Binary files
Expressionsusing ($2*1e3), column("name"), ?:, 1/0 gaps, gnuplot's integer arithmetic and functions, its special functions (erf, gamma, igamma, besj0, lambertw, ... to its last digit), bitwise operators, hex and octal integers; complex numbers (the elementary functions and their inverses, gnuplot's branch cuts); user variables and functions (a = 2, f(x) = a*sin(x)), recursive ones too, expressions in range endsExpressions
Column headersusing 1:"residual", title columnhead, set key autotitle columnheadColumn headers
Functionsplot sin(x)/x, sampled over the data x range, set samples, set style function; set parametric x(t), y(t); set clipFunctions
Smoothingsmooth unique, frequency, fnormal, cumulative, cnormal: averages of repeated x, histograms, distributions; curves csplines, acsplines, bezier, sbezier, mcsplines, kdensity [bandwidth B]; bins[=N] with binrange, binwidth, binvalueSmoothing, Bins
Stringsliterals, ., eq/ne, s[i:j], sprintf (C's, from the exact binary value), strlen, substr, strstrt, words, word, trim, gprintf; string variables and functions; string expressions wherever a string goes (titles, labels, file names, output); the text of data columns (strcol, columnhead), labels and tick labels built from it; strftime, strptime, timecolumnStrings, String columns
Scriptsdatablocks ($DATA << EOD, $DATA[i], |$DATA|), load, call with ARG1..ARG9 and ARGV, eval, @ macros, undefine; function blocks (function $f << EOF, local, return); foresight -c SCRIPT ARGSDatablocks and scripts
Arraysarray A[N], array A = [...], A[i], slices A[i:j], |A|, index(A, v); print A, plot A, stats A; gnuplot's undefined valueArrays
Runtimesystem("cmd"), `cmd`, system "cmd"; reset [session]; pause and the live loop while (1) { plot ...; pause N }Shell commands, reset and pause
Tablesset table "file"|$NAME [append] [separator S]: the points of a plot as gnuplot's text table, to a file, a datablock or the terminal; plot ... with table [if COND], the rows as textTables
Printprint values, set print "file"|$NAME [append]Print
Blocksdo for [i=a:b], do for [w in "..."], while, if/else, break, continue, blocks over linesBlocks and loops
Iterationplot for [i=a:b] ..., set for [...], nested clauses, using 1:i, lc iIteration
Statisticsstats [x] [y] 'file' using N[:M] [name "P"] [output]: gnuplot's STATS_* variables and report, silent unless asked; stats(y), stats(x, y) from FortranStats, Library
Fittingfit [min:max] f(x) 'file' using X:Y[:ERR] via a, b, gnuplot's Marquardt-Levenberg to its digits; a_err, FIT_* variables; silent unless set fit results / logfile; fit(model, x, y, params) from FortranFit, Library
Layoutmultiplot grids with a title, panels in origin/size boxes (insets)Multiplot
Outputinteractive HTML (one self-contained page), SVG, text with characters (dumb) or Unicode blocks and Braille (block), in ANSI colors; atomic rewritesOutput Formats
Viewerwheel and box zoom, pan, u a g h, live coordinates (y2 and x2 too), ticks and markers regenerated on zoom; series hidden from the key; panels sharing x zoomed together; following the end of a live run; the view kept in the URLInteractive Viewer
Circles and pieswith circles (bubbles, wedges); foresight's with pie [donut F], slices named by xtic(N) with their percentagesCircles, pies
Panel chartsforesight extensions: with gauge (sweep gauges of the last value, segmented), with radar, with rose (area by value)Gauges, radars, roses
Polar plotsset polar, set angles, set theta, rrange, trange, set grid polar, set border polar, rtics, ttics, set size square; functions of tPolar plots
Imageswith image heatmaps and rgbimage/rgbalpha colors of x:y:z grids or matrix files; palettes (rgbformulae, defined, cubehelix, file, gray, viridis, negative, maxcolors; foresight extension: named perceptual palettes, Crameri's Scientific colour maps, matplotlib's and Moreland's black body), cbrange, cblabel, cbtics, set format cb, set logscale cb, color box (vertical or horizontal, default or user placed, invert, noborder); embedded PNG, sharp at any zoomImages
Themesforesight extension: set terminal ... theme vfd|lcd|washi|night|classic [glow|noglow] (foresight --theme sets the default), 1980s dashboard colors and glow, the site's light and dark identity; segmented bars (fs solid segments N) with unlit cellsThemes
Readoutsforesight extension: with readout, the last value of an item in seven-segment digits on a glass fixed by format; blocks of readouts over the curves or filling a panel; set readoutReadouts
Monitoring--watch: re-render on any change of the script or its data; reloading pages that keep the zoom or follow the newest data; the text terminal redrawn in placeLive Monitoring
Libraryfigure_object (methods mirroring gnuplot commands), script_object (the interpreter)Fortran Library, API
Command lineforesight [-e CMDS] [-o OUT] [-t THEME] [-w [S]] [--max-cycles N] [SCRIPT | -c SCRIPT ARGS]Command Line
Engineeringpure Fortran 2018; exact tick labels from integers; byte-exact golden tests; never an IEEE exception on bad dataArchitecture

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