Skip to content

Build AquaTerm and re-enable PGPLOT's /AQT driver #9

@karlglazebrook

Description

@karlglazebrook

Background

AquaTerm is a native Cocoa graphics terminal for macOS that PGPLOT (and gnuplot, octave, etc.) can output to. It produces high-quality vector graphics with proper font rendering — qualitatively better than the X11 (XQuartz) terminal for many uses, especially when zooming or saving plots.

Historically PGPLOT's AquaTerm driver (/AQT) was an attractive option for Mac users, but AquaTerm went unmaintained for a while and the driver got disabled in many distributions. SciPDL currently disables it too — patches/pgplot2.patch keeps the AQDRIV line commented out in drivers.list. Even if you uncomment it, the driver doesn't work properly on current macOS (Aquaterm.app launches but no window appears, no error).

There has been some recent activity around AquaTerm:

It's not entirely clear which is the upstream-of-record now, or whether either of them is actively maintained, but there appears to be enough motion that a current build might actually work.

User context

Shugo Suwazono (EEG researcher) plots EEG data with PGPLOT in PDL — typically 25 channels × 5000 points, where PGPLOT's speed is a meaningful advantage over gnuplot. His main pain points with the current SciPDL PGPLOT setup are font rendering and lack of clean vector output. He notes:

Tiny unfortunates include fonts and lack of vector graphics. Aquaterm device have resolved both perfectly until 2022.

He's tried enabling /AQT himself by editing drivers.list after install. The build succeeds, Aquaterm.app launches when he runs pgdemo1 /AQT, but no window appears and no error is printed.

What this issue is asking for

  1. Investigate the current state of AquaTerm (which fork/branch is actually buildable on current macOS Sequoia/ARM?)
  2. Try to build it from source — it's a Cocoa app + framework, probably needs Xcode tooling
  3. Ship the resulting Aquaterm.app and libaquaterm.a (or the framework) inside SciPDL — likely under /Applications/PDL/AquaTerm.app or similar
  4. Re-enable the AQDRIV line in patches/pgplot2.patch
  5. Update PGPLOT's sys_darwin/gfortran_gcc_BigSur_static.conf to link against AquaTerm
  6. Verify with pgdemo1 /AQT that a real plot window appears

Why bother

  • Better-quality plots for users (vector output, proper fonts) — material quality-of-life improvement
  • Long-running PDL/PGPLOT users have been wanting this back for years
  • If we can make it work, it's a strong reason to keep PGPLOT relevant on macOS even as gnuplot/Graphics::Simple become more popular

Risks / open questions

  • AquaTerm's maintenance status is unclear — bundling something we can't update easily is a concern
  • May need code-signing the bundled Aquaterm.app inside the DMG (more complexity in go_dmg)
  • Cocoa frameworks linking statically with Fortran/PGPLOT may have its own surprises
  • May be subject to whatever Apple does with macOS frameworks in the next few releases

Worth at least an investigation pass to see how big a project this would be.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions