Self-contained Fortran plotting library. Backends: PNG (raster), PDF (vector), ASCII. No libpng, no zlib, no Cairo — all custom by design; do not propose replacing them with external libraries.
src/— library (backends/,figures/,plotting/,text/, etc.)test/— FPM tests, organized into subdirectories by areaexample/— runnable examples, outputs tooutput/example/<name>/doc/— FORD source; built site lands inbuild/doc/Makefile— top-level entry; wraps fpm + verification gatesfpm.toml— package config (auto-discovery on)CMakeLists.txt— alternative build for downstreamFetchContent. Do not delete.
make build/fpm buildmake test/fpm test(all tests)make test-ci(fast CI subset)make example(regeneratesoutput/example/...)make verify-artifacts(rendering gate: required for any change that touches plots, ticks, labels, or backends)make doc(FORD →build/doc/index.html)make clean
fpm test --target <name> runs one test. make test ARGS="--target test_public_api" does the same via the Makefile.
- Free-form Fortran, no implicit typing. Use
use fortplot, only: wp => real64. - Modules < ~500 lines (hard ceiling 1000). Functions < 50 lines (hard 100).
- Exception:
src/figures/core/fortplot_figure_core_main.f90(817 lines) is a public API facade where Fortran requires allprocedure ::/generic ::type-bound interfaces in the same module as the type definition. Implementations are split across submodules. See issue #1925.
- Exception:
- Each
test/<area>/directory under 50 files (soft 20). Tests namedtest_*.f90. - Test artifacts go to
build/test/output/viasrc/testing/fortplot_test_helpers.f90, never to repo root. - Conventional Commit subjects:
fix:,feat:,docs:,refactor:,cleanup:.
For any visual change: run make verify-artifacts, then attach in the PR the commands you ran, the artifact paths, and a short text excerpt (e.g. from pdftotext) proving the label or curve is correct. PRs that affect rendering without this evidence do not merge.
GitHub Actions runs make example → copies outputs to doc/media/examples/<example>/ → FORD builds. Markdown in doc/examples/*.md references images as ../../media/examples/<example>/<file>.png. Preserve that subdirectory structure on both sides — don't flatten.
gh issue list --state open --limit 500(the default truncates to 30).- Search before filing:
gh issue list --state open --limit 500 --search "<keyword>". - Edit issue bodies (
gh issue edit) instead of piling comments. - Issues without external library replacement proposals — they violate the independence policy and get closed on sight.
make buildsucceeds.make test(or at leastmake test-ci) passes — no skipped or weakened tests.- For rendering changes:
make verify-artifactspasses and the evidence is attached. - No new file exceeds the size limits above.