Skip to content

FIGUREImmediate-mode GUIs from Fortran

Fortran Immediate-mode GUI for User interfaces, Rendering and Exploration. FIGURE is Dear ImGui widgets and ImPlot plots for Fortran programs, declared every frame from ordinary Fortran variables, on SDL3 and OpenGL 3. It is not a retained-mode toolkit (no widget tree, no event callbacks into Fortran: a widget call returns what the user did), has no windows outside the main one (multi-viewports), and does not support calls to its raw C bindings. Start with Install, then the Tutorial.

the FIGURE logo, a window and its plot drafted with a brush, signed with a vermilion seal carved with an Fthe FIGURE logo, a window and its plot drafted with a brush, signed with a vermilion seal carved with an F

See it running ​

exe/examples/figure_hello: a check box, a slider and a button bound to Fortran variables, and a plot of a Fortran array

Every picture on this site is a recording of the program it describes, made by scripts/docs_media.py: the frames are the program's own back buffer, captured with FIGURE_CAPTURE and driven by a scripted mouse, in FIGURE's default style, seal.

Status ​

FIGURE v0.8.0 is released (2026-11-19). It grew from its first application outside this repository, tools for a CFD solver (showcase): forms, menus and dialogs, docking layouts, icons and workspace toolbars, plots for live checks. CI runs on Linux, macOS and Windows with gfortran and on Linux with nvfortran and Intel ifx, and opens a real window on the three systems. The API can still change before v1.0 (roadmap). FIGURE is released under the MIT licence.

Quick start ​

fortran
call app%init('FIGURE: first window', 640_int32, 360_int32)
do while (app%next_frame())
   if (ig_begin('Hello')) then
      call ig_text('Hello from Fortran.')
   endif
   call ig_end()
enddo
call app%destroy()
bash
curl -fsSL https://github.com/szaghi/figure/releases/latest/download/install.sh | bash -s -- --gnu

The one-line installer builds the latest release with gfortran, installs it into ~/.local and prints the line that compiles a program against it. Chapter 1 of the tutorial is the whole program around the loop above, and its build. The requirements and the other routes (fpm, FoBiS, building from the repository) are in Installation.

Authors ​

Released under the MIT licence.