
A full-featured GTK4 widget to display 2D data in a graph. It is intended to display scientific data, and can format the data in polar or cartesian plots (log axes available for cartesian plots).
The current version is 1.37, a GTK4/Cairo/Pango port of the original X11/Xt widget. Source is available from the repository.
The SciPlot Widget is a GTK4 widget capable of plotting cartesian or polar graphs, including logarithmic axes in cartesian plots. It is implemented as a GObject subclass of GtkWidget and draws using the Cairo 2D graphics library with Pango for text layout.
Features provided in the widget include automatic scaling, legend drawing, axis labeling, PostScript output, multiple plotted lines, color support, user font specification, dashed lines, symbols drawn at points, logarithmic scales on one or both axes in cartesian plots, and degrees or radians as angles in polar plots.
Features provided in the widget include the following:
See the demo program information page for compilation instructions and sample programs.
The SciPlot widget requires GTK4 (4.0 or later), Cairo (with PostScript support), and Pango/pangocairo. Build uses autoconf/automake and pkg-config. A C99 compiler is required.
The SciPlot widget was originally written by Rob McMullen in 1994 as an X11/Xt widget, developed on an IBM RS/6000 running AIX 3.2.4 and X11R5. It was widely used with Athena, Motif, and other Xt-based widget sets.
In 2026, the widget was ported to GTK4/Cairo/Pango by Barak A. Pearlmutter as part of the Debian package maintenance. The X11/Xt widget infrastructure was replaced by a GObject-based GTK4 widget subclass. Drawing is now performed via Cairo in the snapshot() virtual method using a retained display list. Font metrics and text rendering use Pango. Vertical text rendering, which previously used an X11 pixmap rotation technique, now uses cairo_rotate(). PostScript output uses Cairo's PS surface rather than manual PS generation. The Motif-based utility dialogs were rewritten using GTK4 widgets.
The first X11 plotting widget that Rob McMullen encountered was the libXG package written by Sundar Narasimhan <sundar@ai.mit.edu>, which inspired the original SciPlot design.
This widget is supplied as free software under the GNU Library General Public Licence. If you use this widget, please include mention of the SciPlot widget in your documentation and retain the copyright notice.
The original author can be reached at <rwmcm@orion.ae.utexas.edu>. The Debian package is maintained by <bap@debian.org>.
Thanks to the following people for providing fixes and suggestions to the original X11 version:
Copyright (c) 1996 Robert W. McMullen
Copyright (c) 2026 Barak A. Pearlmutter (GTK4/Cairo port)