GraphiC 2026: Resurrecting our 1981 DISSPLA-inspired scientific plotting engine for Modern Fortran (with live 24/7 telemetry demo)

James,

This looks great but I have some questions.

  1. Are you duplicating DISSPLA procedure names. Some look familiar but its been a very long time since I used DISSPLA that I can’t say for sure.
  2. If so, what DISSPLA procedures are replicated.
  3. Also, for DISSPLA procedures, do you replicate the argument list (ie signature).

I have several old codes in my archives I would love to bring back to life but they used DISSPLA and I didn’t want to go through the effort of replacing the DISSPLA code with something like PLPLOT, DISLIN, or one of the CALCOMP clones that are available. At one time there was some support for DISSPLA routines in DISLIN through either a module that wrapped DISLIN routines or an INCLUDE file (don’t remember which). Also, you might want to add PLPLOT to your comparisons. When I get time I’ll download the community version and play around with it.

As to compiling/packaging, I would vote for FPM first. I’m not a big fan of CMAKE. I’m also not a big fan of shared libs (prefer archives on Linux) but I believe you have to have them on Apple but I’m probably wrong about that.

Hi @rwmsu,

Thank you for the thoughtful questions!

1 & 2. DISSPLA Procedures & Mental Model

When we designed GraphiC in 1981, we deliberately adopted DISSPLA’s mental model because it was by far the cleanest, most intuitive procedural plotting paradigm of that era.

The core procedural workflow is almost identical:

  • Initialization: BGNPL / bgnplot → gpc_begin()
  • Frame setup: PAGE → gpc_page(width, height)
  • Plotting area: AREA2D → gpc_area2d(width, height)
  • Axes / Grid: GRAF → gpc_graf(...), BOX → gpc_box()
  • Data plotting: CURVE → gpc_curve(x, y, n, style)
  • 3D surfaces: SURFACE → gpc_surface(z, nx, ny)
  • Contouring: CONMAT → gpc_contour(...)
  • Termination: ENDPL → gpc_end(), DONEPL → gpc_stop()

In the modern Fortran module, we prefixed high-level procedures with gpc_ (e.g. gpc_page, gpc_area2d, gpc_curve) to avoid namespace clashes with user routines, though aliases without the prefix can easily be added.

3. Signatures & Arguments

The argument lists are very similar in spirit, but not identical byte-for-byte to 1970s DISSPLA:

  • Strings: We use modern Fortran character dummy arguments (character(len=*)) which our module null-terminates automatically for C, rather than old Hollerith strings ('10HTITLE...') or manual character count arguments.
  • Axis formatting: GraphiC’s gpc_graf incorporates C-style format strings (e.g. "%3.1f", xmin, xstep, xmax, "%3.1f", ymin, ystep, ymax) to give precise numeric tick label control.
  • Data Arrays: gpc_curve takes standard 1D Fortran real arrays directly: call gpc_curve(x, y, n, style).

DISSPLA Compatibility Module:
Because the state machine is identical, writing a thin disspla_compat Fortran module that maps exact DISSPLA subroutine signatures (like CALL BGNPL(1), CALL PAGE(8.5, 11.0), CALL AREA2D(6.0, 4.0), CALL GRAF(...), CALL CURVE(X, Y, N, 0), CALL ENDPL(1)) straight to GraphiC calls is very straightforward. If you have specific legacy codes or key DISSPLA routines you’d like to resurrect, let me know—I’d be delighted to help put together that mapping layer.

FPM and Static Archives

  • FPM: That is a great recommendation. Fortran Package Manager (fpm) has become wonderful for the modern ecosystem, and packaging GraphiC with an fpm.toml is definitely high on our list.
  • Static Archives (.a): Fully agree. On both Linux and macOS (Apple Silicon / Intel), GraphiC compiles into a standalone libgraphic.a. You can link it directly with gfortran your_code.f90 libgraphic.a -lm—no shared library path (LD_LIBRARY_PATH / DYLD_LIBRARY_PATH) hassles required.
FPM Support Is Now Live!

Based directly on your feedback, **we just added full native FPM support to the Community Edition release and updated the download archive!**

You don’t need Makefiles or CMake:

1. Download or extract the archive: https://jamesrome.com/download/release/GraphiC_2D_Community.zip

2. Run:

```bash

fpm build

fpm run --example sample

fpm run --example d2test

fpm run --example logtest

  1. To use GraphiC in your own Fortran simulation or project, you can simply add it to your fpm.toml:

    toml
    
    dependencies

    graphic = { path = “../GraphiC-2D-Community” } # or git repo

I will also definitely take a look at adding PLplot to our comparison table on the site.

Let me know what you think once you get a chance to try the Community Edition!

Hi James,

I have tried to compile it under Windows 10.

With gcc (GCC) 12.1.0 for windows, I changed the Makefile:

CC = gcc

But get this error:

Microsoft Windows [Version 10.0.19045.6466]
(c) Microsoft Corporation. All rights reserved.

D:\00Fortran\GraphiC-2D-Community>make
gcc -O2 -IInclude -DGPC_PORTABLE=1 -DGPC_COMMUNITY=1 -Wno-everything -c Source/Arrow.c -o build/Arrow.o
In file included from d:\gcc\x86_64-w64-mingw32\include\winnt.h:9,
                 from d:\gcc\x86_64-w64-mingw32\include\minwindef.h:163,
                 from d:\gcc\x86_64-w64-mingw32\include\windef.h:9,
                 from d:\gcc\x86_64-w64-mingw32\include\windows.h:69,
                 from Include/graphic.h:132,
                 from Source/Arrow.c:6:
Include/proto.h:624:11: error: conflicting types for 'SetDefaultPrinterA'; have 'void(int)'
  624 | void TYPE SetDefaultPrinter(int prnt_number);
      |           ^~~~~~~~~~~~~~~~~
In file included from d:\gcc\x86_64-w64-mingw32\include\windows.h:102:
d:\gcc\x86_64-w64-mingw32\include\winspool.h:1200:18: note: previous declaration of 'SetDefaultPrinterA' with type 'WINBOOL(const CHAR *)' {aka 'int(const char *)'}
 1200 |   WINBOOL WINAPI SetDefaultPrinterA(LPCSTR pszPrinter);
      |                  ^~~~~~~~~~~~~~~~~~
Include/proto.h:624:11: error: conflicting types for 'SetDefaultPrinterA'; have 'void(int)'
  624 | void TYPE SetDefaultPrinter(int prnt_number);
      |           ^~~~~~~~~~~~~~~~~
d:\gcc\x86_64-w64-mingw32\include\winspool.h:1200:18: note: previous declaration of 'SetDefaultPrinterA' with type 'WINBOOL(const CHAR *)' {aka 'int(const char *)'}
 1200 |   WINBOOL WINAPI SetDefaultPrinterA(LPCSTR pszPrinter);
      |                  ^~~~~~~~~~~~~~~~~~
cc1.exe: note: unrecognized command-line option '-Wno-everything' may have been intended to silence earlier diagnostics
make: *** [makefile:71: build/Arrow.o] Error 1

D:\00Fortran\GraphiC-2D-Community>

If compile with Intel Fortran 2025.1+VS2022, the error will be:

Regards,

Cean

Hi Cean,

Thank you for reporting this!

The issue was that `_WIN32` previously triggered the legacy 1993 Windows GDI GUI driver path (`GPC_WIN=1`), which pulled in `<windows.h>` and `<winspool.h>`. That header defines a macro `#define SetDefaultPrinter SetDefaultPrinterA`, colliding with GraphiC’s internal routine. In the modern 2026 engine, everything is headless and outputs clean vector SVG via `GPC_PORTABLE=1`.

I have updated the package:

1. `GPC_PORTABLE=1` and `GPC_WIN=0` are now the default on Windows.

2. `SetDefaultPrinter` is properly guarded against Windows macro pollution.

3. Legacy 16-bit DOS includes (`<dos.h>`) and POSIX-only headers (`<sys/time.h>`, `<unistd.h>`) have been eliminated so it compiles cleanly under MSVC and Intel Fortran (`ifx`), using Windows native high-resolution timers (`QueryPerformanceCounter`).

4. Replaced the Clang-specific `-Wno-everything` with standard `-w`.

You can re-download the updated **GraphiC-2D-Community.zip**.

To compile:

- **MinGW / GCC**:

```bash

make CC=gcc

  • Visual Studio 2022 / Intel Fortran 2025.1: You can build with CMake:

    cmd
    

    cmake -B build -G “Visual Studio 17 2022”

    cmake --build build --config Release

    Or if using the Fortran Package Manager (fpm):

    cmd
    

    fpm build --compiler ifx

    fpm run --example sample

Hi James,

Thank you very much.

  1. Makefile

    On my Windows 10, It goes into the ‘else’ branch and makes two folders: -p and build

    MKDIR_OBJ = @mkdirmkdirmkdirmkdir -p $(OBJ_DIR)
    It should uses the lines from the ‘ifeg’ branch:
    MKDI@if_O@ifJ = @if not exist $( OBJ_DIR ) mkdir (OBJ_DIR).

    It compiles C examples and works well. No Fortran examples compiled.

  2. CMakeLists.txt No examples compiled.

  3. fpm

    It compiles Fortran examples. When run the bartest.exe, it only generate a html file, no svg file. Error see attached screenshot.
    It has the graphic.mod and graphic_iso.mod files. I can use them to compile the examples and has svg file generated successfully.

Cheers,

Cean

fpm run --example sample

This runs well. Can has svg generated. No need to find where sample.exe is.

Caen,

Thanks very much for finding these bugs; they are all fixed. Download a new version at our Web site.

Fixed
Multi-Level Asset Discovery & Windows Make/CMake Hardening

  • Multi-Tier Asset & Font Discovery: Upgraded file locator (gfopen) to search upward up to 5 directory levels from both the current working directory and the executable/library path. Eliminates missing font or message table errors when running binaries from subtrees (e.g. Fortran Package Manager build/.../example/ or IDE build folders).
  • Case-Insensitive Font Matching: Added automatic case-variant fallback (simplex.fnt ↔ Simplex.fnt) to ensure consistent font resolution across case-sensitive Linux filesystems and case-preserving Windows/macOS partitions.
  • Defensive Memory Guards: Initialized safe fallback metrics and NULL stroke guards in font and text rendering engines, preventing segmentation faults if required font files are missing or unreadable.
  • Windows Command Prompt (cmd.exe) Makefile: Corrected shell detection in Windows Makefiles to strictly use cmd.exe with native directory commands (if not exist $(DIR) mkdir $(DIR)), preventing erroneous -p directory creation.
  • Fortran Example Build Targets: Added automatic Fortran compiler detection and Fortran example targets (make fortran) in Community Edition Makefile, plus BUILD_EXAMPLES support in CMakeLists.txt.

FPM is now supported

We have a new update to GraphiC 2026:

2026-09-30 v7.3.0 • Latest Added
Unified Packaging Architecture, 3D Waterfall/Plane3D Cards & Multi-Platform Toolchain Guides
  • Unified Standalone Packaging Architecture:
    Introduced standalone downloadable ZIP distribution pipelines (package_distribution.py, package_community.py) creating versioned deliverables (GraphiC-2D-Community-v7.3.0.zip and GraphiC-2026-v7.3.0.zip) while preserving legacy mirrors (GraphiC_2D_Community.zip) for permanent download links.
Date What Was Changed
2026-09-30 v7.3.0 • Latest Added
Unified Packaging Architecture, 3D Waterfall/Plane3D Cards & Multi-Platform Toolchain Guides
  • Unified Standalone Packaging Architecture:
    Introduced standalone downloadable ZIP distribution pipelines (package_distribution.py, package_community.py) creating versioned deliverables (GraphiC-2D-Community-v7.3.0.zip and GraphiC-2026-v7.3.0.zip) while preserving legacy mirrors (GraphiC_2D_Community.zip) for permanent download links.
  • Dedicated 3D Visualization Reference Cards:
    Added complete 4-language signatures (C, Modern Fortran, Python 3, Java 22), parameter tables, and usage guidelines for d3bars(bwid), modernized 3-argument planar cross-section routine plane3d(wplane, pos, hide), and spectral waterfall plots WaterfallPlot / WaterfallCurve.
  • Publication-Grade Typography Architecture Diagram (Figure 5.1):
    High-resolution vector SVG and 300-DPI diagram illustrating GraphiC’s three parallel typography subsystems: Vector Stroke Fonts (.FNT Hershey primitives), TrueType Engine (.TTF Quadratic Bézier B-splines), and PostScript Type 1 (.PFB Cubic Bézier CharStrings).
  • Comprehensive Toolchain & Fortran Compiler Guide (§3.5):
    Documented compiler compatibility across GNU gfortran (4.8+), Intel ifx/ifort, LLVM flang, NVIDIA nvfortran, NAG nagfor, gcc, Apple clang, and MSVC. Added cross-platform installation instructions for Fortran Package Manager (fpm) across macOS Homebrew, Conda/Mamba, Linux, and Windows MSYS2.
  • Master Function Index Expansion (203 Routines):
    Expanded to 203 fully verified routines with all 96 Community Edition routines highlighted in bold green.

Changed
Multi-Line Reference Layouts & Interactive Navigation

  • Multi-Line Function Cards & Signatures: Formatted all 32 multi-function reference cards in Chapter 7 onto clean dedicated lines, splitting 115 multi-signature table cells across C, Fortran, Python, and Java.
  • Clickable Table of Contents: 91 fully clickable interactive hyperlinks in PDF and Word navigation panes.
2026-09-29 v7.2.0 Added
Hardware-Accelerated SVG Vector Shading, Continuous Colormaps & TrueType Typography
  • Hardware-Accelerated SVG Vector Shading & Pattern Fill Engine (Source/gpc_driver_svg.c):
    Native vector shading and pattern engine delivering:
    • 16 Native SVG Vector Pattern Fills: Scalable SVG <pattern> definitions (gpc_pat_1 to gpc_pat_16) providing crisp vector crosshatches, horizontal/vertical lines, 45°/135° diagonals, fine/coarse grids, dot stipples, brick, and checkerboard textures for polygon and bar shading without rasterization.
    • Seamless Linear Vector Gradient Shading: Built-in SVG <linearGradient> definitions with 33 smooth color stops supporting both vertical (gpc_cmap_v_0..6) and horizontal (gpc_cmap_h_0..6) shading orientations across all 7 scientific colormaps.
    • Multi-Path Polygon Panel Shading (flush_svg_panel): Renders arbitrary closed multi-contour polygons with SVG evenodd fill-rule, boundary clipping, TrueColor RGB fill, and independent border stroke styling.
    • Continuous Scalar Shading: Seamless O(1) scalar-to-color mapping for high-density 2D/3D datasets, scatter clouds, and continuous color bars with zero pixelation at any zoom level.
  • Continuous Scientific Colormaps (Source/Colormap.c, Include/colormap.h):
    7 built-in mathematically uniform 256-node standard scientific colormaps: Viridis (0), Plasma (1), Inferno (2), Magma (3), Coolwarm (4), Rainbow (5), and Turbo (6).
  • Fast Scalar-to-Color Query API:
    Functions gpc_get_color(colormap_id, val, minv, maxv) for packed 24-bit TrueColor integers (0x01RRGGBB), gpc_get_rgb for discrete R, G, B components (0..255), gpc_colormap_eval, and gpc_rgb.
  • High-Density Multidimensional Scatter (gpc_scatter):
    Renders 2D scatter points where each marker’s color is evaluated continuously from an associated third-dimension scalar array z through any colormap.
  • Continuous SVG Linear Vector Gradient Color Bars (ColorKeyGradient):
    Emits hardware-accelerated SVG linear gradients with 33 smooth color stops, bounded border framing, numerical calibration ticks, and publication typography.
  • TrueType Font Typography (Arial.ttf & Swiss.ttf):
    Bundled standard TrueType font files with native UTF-8 Greek, subscript, superscript, and math symbol rendering.
  • Continuous Color Scale Plots Showcase Benchmark (Turbulence / §9.26):
    Renders 7,850 measurement points correlating Temperature against Transport, continuously shaded by log₁₀ Density with vertical gradient color bar and TrueType mathematical labels. Added Section 9.26 to the Reference Manual.