Skip to content

Investigate replacing PGPLOT with giza (Cairo-based PGPLOT-compatible library) #12

@karlglazebrook

Description

@karlglazebrook

What is giza

giza (Daniel Price, original SPLASH visualization team) is a modern 2D scientific plotting library written in C with a Fortran interface, built on top of Cairo. It's specifically designed as a drop-in replacement for PGPLOT — it compiles a version of libpgplot and libcpgplot that existing PGPLOT programs can link against without code changes (just an LD_LIBRARY_PATH swap).

Status as of April 2026: actively maintained, 14 releases, latest v1.5.0 (April 2025), in stable use for 10+ years as the visualization backend for SPLASH.

Why this is interesting for SciPDL

PGPLOT itself is essentially unmaintained — last upstream release was Feb 2001 (24+ years ago). We're already carrying significant patches against it (patches/pgplot2.patch) and bundling it through workarounds (the gfortran wrapper, the static re-link of PGPLOT.bundle, etc.). And as several other open issues note, its macOS graphics backends are aging:

A switch to giza could potentially solve all of these in one move:

What this issue is asking for

A pre-feasibility investigation:

  1. Build giza on macOS Sequoia/ARM — how easy is it? What deps does it really need (cairo, png, X11)? What's the static-linking story?
  2. Drop-in test against PDL::Graphics::PGPLOT — install giza alongside SciPDL, swap library paths, run the existing PGPLOT tests. Does it Just Work?
  3. Check known compatibility gaps. Karl recalls there were gaps "a few years ago" — are they still there? File-level compat? Driver coverage? Font handling?
  4. Static-link giza into SciPDL's bundle the same way we do for PGPLOT now, including its Cairo dependency tree

If those go well, the question becomes: should the next major SciPDL release switch from real PGPLOT to giza-pretending-to-be-PGPLOT? Probably yes, but with a transition period to make sure nothing user-facing breaks.

Risks / open questions

  • Cairo brings transitive deps (libpixman, libfontconfig, libfreetype) — bigger bundle
  • Some PGPLOT features may not be in giza (need to check)
  • Anything depending on PGPLOT's internal binary layout (probably nothing in PDL?) would break
  • giza's "drop-in replacement" claim is broad — needs testing for edge cases

Related issues

Status

Investigation, not commitment. This is a "would be nice if it works" project. If giza turns out to have shipping-quality PGPLOT compatibility on macOS in 2026, it's a major win for SciPDL's long-term sustainability. If not, no harm done.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions