SciPlot Widget Web Page

# SciPlot Widget

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).

- Current Version
- Screen Shots
- Overview
- Features
- Requirements
- History
- Author's Note
- Thanks
- Copyright

- Programmer's Documentation
- Demo Program Information

## Current Version

The current version is 1.37, a GTK4/Cairo/Pango port of the original X11/Xt widget. Source is available from the repository.

## Screen Shots

## Overview

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

Features provided in the widget include the following:

- Cartesian or Polar plots
- Automatic or manual axis scales
- Logarithmic scales for cartesian plots
- Degrees or radians for polar angles
- Axis labeling
- Legend drawing
- Multiple lines per plot
- Noncontinuous (broken) line segments
- Various symbols and line styles
- Color support
- User font selection
- PostScript (EPS) output
- Real-time streaming updates (`sciplot-realtime` reads from stdin)
- Vertical or horizontal y axis label numbers

See the demo program information page for compilation instructions and sample programs.

## Requirements

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.

## History

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.

## Author's Note

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

Thanks to the following people for providing fixes and suggestions to the original X11 version:

- Todd Smith `<mtsmith@vision1.engr.utk.edu>`
- Walter Underwood `<wunder@msd.hpl.hp.com>`
- Michael Katzmann `<michael%vk2bea@secondsource.com>`
- John Moyer `<jrm@questconsult.com>`
- Mike Kienenberger `<FXMLK@aurora.alaska.edu>`
- Glenn Golden `<gdg@big.att.com>`
- `<SATCHELL%CCF.dnet@hermes.dra.hmg.gb>`
- Derrick Bass `<derrick@frank.harvard.edu>`
- Santeri Paavolainen `<santtu@bank.cs.hut.fi>`
- Nicolas EERTMANS `<ne@spirou.eatchip.eurocontrol.be>`
- Carlos Baumann `<carlosb@ticam.utexas.edu>`

## Copyright

Copyright (c) 1996 Robert W. McMullen
Copyright (c) 2026 Barak A. Pearlmutter (GTK4/Cairo port)

###### This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

###### This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

###### You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

SciPlot : Programmer's Reference | Demo Programs

Originally by Rob McMullen. GTK4 port by Barak A. Pearlmutter. Updated: 2 Jun 2026