{"slug": "figure-v0-8-0-is-out-dear-imgui-and-implot-for-fortran-programs-beta-still-an", "title": "FIGURE v0.8.0 is out: Dear ImGui and ImPlot for Fortran programs (beta, still an experiment)", "summary": "FIGURE v0.8.0, a beta Fortran library by szaghi that wraps Dear ImGui, ImPlot and ImPlot3D on SDL3 and OpenGL 3 for Linux, macOS and Windows, has been released as the project's first publicly announced version. The release provides immediate-mode windows, widgets and plots for Fortran programs, including remote serving to a web browser via app%init_remote() with an access token, headless CI testing through the figure_testing module, and a one-line installer that builds the latest release and installs it into ~/.local. The author cautions that FIGURE has had only eight minor releases, the API can and will change before v1.0, and most of the library has been exercised by its tests rather than by users.", "body_md": "Fortran Immediate-mode GUI for User interfaces, Rendering and Exploration\n\nFIGURE gives a Fortran program interactive windows, widgets and plots: [Dear ImGui](https://github.com/ocornut/imgui), [ImPlot](https://github.com/epezent/implot) and [ImPlot3D](https://github.com/brenocq/implot3d) on SDL3 and OpenGL 3, on Linux, macOS and Windows. It is **immediate mode**: no widget objects, no handles, **no callbacks**. The interface is declared every frame, and its state is your own variables. Plots read your arrays **in place**, without copies. v0.8.0 is the first release I announce here (written with the help of an AI assistant).\n\n**Disclaimer: beta, and still more an experiment than a mature library.** FIGURE has had only eight minor releases; the API **can and will change** before v1.0. Few applications use it so far (my own tools for a CFD solver), so most of it has been exercised by its tests, not by users. The native layer carries a few patches to Dear ImGui and ImPlot that are not upstream yet, and the [known issues](https://szaghi.github.io/figure/guide/known-issues) page is not short. Try it, break it, tell me; do not build anything on it yet that you cannot afford to rewrite.\n\n`figure_hello`: a button, a frequency slider dragged by the mouse, and a sine wave that follows it.\n\n`mpirun`) run with their output streamed into a log view.` app%init_remote()` serves the same interface to a web browser, with an access token: no display or GPU on the program’s side, e.g. a cluster node through an SSH tunnel.`app%init_headless()` and the `figure_testing` module drive the interface with synthetic input (clicks, keys, typing) in CI without a display, and a CPU renderer draws every frame, so tests compare pictures with goldens.\n`figure_mandelbrot`: 60 wheel steps, about 175 times into the seahorse valley, then more iterations; every frame recomputed at the plot’s resolution and uploaded as a texture.\n\n*A Lorenz trajectory growing in an ImPlot3D plot, its newest point marked; a right drag turns the box.*\n\n*FIGURE’s 3-D view: a slender body coloured by a field, cut by a plane moved and turned with a gizmo.*\n\nThe whole of a program with a window, a slider and a plot that follows it:\n\n```\nprogram readme\nuse, intrinsic :: iso_fortran_env, only : int32, real64\nuse figure, only : app_object, ig_begin, ig_end, ig_set_next_window, ig_slider, ip_begin_plot, ip_end_plot, ip_line\n\nimplicit none\ntype(app_object) :: app\nreal(real64)     :: x(200)\nreal(real64)     :: frequency\ninteger(int32)   :: i\n\nx = [(0.05_real64 * i, i = 0, 199)]\nfrequency = 1.0_real64\ncall app%init('FIGURE', 800, 500)\ndo while (app%next_frame())                 ! the interface is declared every frame\n   call ig_set_next_window(20.0_real64, 20.0_real64, 760.0_real64, 460.0_real64)\n   if (ig_begin('Wave')) then\n      if (ig_slider('frequency', frequency, 0.1_real64, 5.0_real64)) continue\n      if (ip_begin_plot('sin(f x)', height=-1.0_real64)) then\n         call ip_line('y', x, sin(frequency * x))\n         call ip_end_plot()\n      endif\n   endif\n   call ig_end()\nenddo\ncall app%destroy()\nendprogram readme\ncurl -fsSL https://github.com/szaghi/figure/releases/latest/download/install.sh | bash -s -- --gnu\ngfortran readme.F90 $(pkg-config --cflags --libs figure) -o readme\n```\n\nThe one-line installer builds the latest release (`--nvidia` for nvfortran), installs it into `~/.local`, compiles and runs a test program against it, and prints the line above.\n\nThe same kind of program grows into an application by adding windows: here they dock into one another.\n\n*A window dragged by its title bar onto the Log area docks there as a tab; then the frequency slider changes the plot.*\n\nIts appearance changes at runtime: `app%set_style` picks one of seven built-in styles, or combines a look (the geometry) with a palette (the colours); every colour and size of Dear ImGui and ImPlot can be set by name; and the style editor saves a theme file that the program loads back.\n\n`gallery`: one program through the seven built-in styles (seal, seal-light, paper, high-contrast, and Dear ImGui’s dark, light, and classic), one and a half seconds each.\n\nThe [showcase](https://szaghi.github.io/figure/guide/showcase) is the application that drove the design: a run checker and two input editors for a CFD solver, in one window, with the solvers run from it.\n\n`xall_evol`, the run checker: the residuals of six variables on a log axis follow a run’s history files as they grow; the summary table updates (synthetic files).\n\n`xall_gui`: the mesh tool runs on 2 processes from the window; its output scrolls, with a notification when it finishes.\n\n`ig_color_picker`), pie charts and bubbles (` ip_pie_chart`, `ip_bubbles`), error bars along x; in ImPlot3D, colours and sizes per point, axis formats and ticks, its style by name.\n*New in v0.8.0: pie charts and bubbles.*\n\n*The tutorial’s solver studio, chapter 13: F5 runs the solver; when it has converged, the plate’s temperature is shown as a heatmap with labelled contour lines and a colour bar.*\n\nFIGURE builds with FoBiS or fpm (a self-contained `vX.Y.Z-fpm` tag per release), its native layer with CMake; your own project finds an installed FIGURE with `pkg-config` or CMake’s `find_package(figure)`. Only SDL3 comes from the system. It is released under the MIT licence; the native layer compiles Dear ImGui, ImPlot, cimgui and cimplot (MIT) and SDL3 (zlib).\n\nComing next: FIGURE’s patches to Dear ImGui and ImPlot reported upstream, and whatever the first users find.\n\nFeedback, issues, and contributions are welcome, and in this phase, bug reports most of all.\n\nStefano", "url": "https://wpnews.pro/news/figure-v0-8-0-is-out-dear-imgui-and-implot-for-fortran-programs-beta-still-an", "canonical_source": "https://fortran-lang.discourse.group/t/figure-v0-8-0-is-out-dear-imgui-and-implot-for-fortran-programs-beta-still-an-experiment/11321#post_1", "published_at": "2026-11-19 16:58:05+00:00", "updated_at": "2026-11-19 17:11:30.678573+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["FIGURE", "Dear ImGui", "ImPlot", "ImPlot3D", "SDL3", "OpenGL 3", "Fortran", "szaghi"], "also_reported_by": [], "takeaway": "FIGURE v0.8.0 lets Fortran programs declare Dear ImGui/ImPlot interfaces every frame with no callbacks, serve the same UI to a browser via app%init_remote() with an access token, and drive it headlessly in CI with synthetic input and CPU-rendered golden-image comparisons.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/figure-v0-8-0-is-out-dear-imgui-and-implot-for-fortran-programs-beta-still-an", "markdown": "https://wpnews.pro/news/figure-v0-8-0-is-out-dear-imgui-and-implot-for-fortran-programs-beta-still-an.md", "text": "https://wpnews.pro/news/figure-v0-8-0-is-out-dear-imgui-and-implot-for-fortran-programs-beta-still-an.txt", "jsonld": "https://wpnews.pro/news/figure-v0-8-0-is-out-dear-imgui-and-implot-for-fortran-programs-beta-still-an.jsonld"}}