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
-
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!