# SciPlot Widget

A full-featured Xt 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).

- Works with LessTif!
- Current Version
- Screen Shots
- Overview
- Features
- Requirements
- History
- Author's Note
- Thanks
- Copyright

- Programmer's Documentation
- Demo Program Information

## Works with LessTif!

The SciPlot demo programs can now be built with LessTif

## Current Version

The current version is 1.36. Source is available at ftp.x.org.

Note my new licencing policy -- the GNU Library General Public Licence. This is not the standard GPL; it is a less restrictive version. Read this for more info and background on why I moved to this licence.

## Screen Shots

## Overview

The SciPlot Widget is a widget capable of plotting cartesian or polar graphs, including logarithmic axes in cartesian plots. The widget is subclassed directly from the Core widget class, which means that it does not depend upon any other widget set. It may be freely used with Athena, Motif, or the Open Look/Xview widget sets. (There is optional Motif support that causes the widget to be subclassed from XmPrimitive. See the Programmer's Reference for more information.)

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 plot
- 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 in color or black & white
- Real time updates
- Vertical or horizontal y axis label numbers

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

## Requirements

The SciPlot code requires X11R5 or later and a C compiler. The code was designed using ANSI C, but compiles fine with a non-ANSI compiler if the compiler can understand new-style function definitions. The demo programs also require Motif 1.2 or later.

## History

This code was originally developed on an IBM RS/6000 running AIX 3.2.4 and X11R5. Currently, it is maintained on a Linux machine running kernel 1.3.* and XFree86 3.1.2 (X11R6). It is regularly tested by myself on an IBM RS/6000 running AIX 4.1 and a DEC Alpha/AXP running Digital UNIX (formarly OSF/1) 3.2 with X11R5. I have had reports of the widget running successfully on many machines, including SGI, HP, Sun, Dec Ultrix, and even a Dec OpenVMS machine.

The vertical text drawing routine is based on the "fill stippled" idea that I first saw in the code xvertext-5.0 by Alan Richardson `<mppa3@syma.sussex.ac.uk>`.

The first X11 plotting widget that I saw was the libXG package written by Sundar Narasimhan `<sundar@ai.mit.edu>`. The libXG plotting widget Graph is based on a much more general widget called Display, which provides device independent 2D (and 3D) graphics.

My attempts to change the Graph widget to do what I liked it to do led me to start from scratch and write this SciPlot widget. I didn't need (or want) to include the sort of functionality present in the Display widget, so I wrote the SciPlot widget as a self-contained widget that uses printer points as the basis of the graphics. Nevertheless, some of the techniques that I used are similar to those found in the Graph widget, so Sundar Narasimhan does deserve mention for the excellent libXG package.

## Author's Note

This widget is supplied as freeware, in the hope that it will be useful for developers in the X community. If you do use this widget, I do request that you include mention of the SciPlot widget in the documentation. Also, remember to include a copy of the entire copyright and permission notice! Thanks.

Patches, improvements, suggestions, bug reports, job offers, volleyball games, and money you love donating to programmers who make your life so much easier are welcome at `<rwmcm@orion.ae.utexas.edu>`. I will periodically post patches and improvements to ftp.x.org and the SciPlot web page at http://www.ae.utexas.edu/~rwmcm/SciPlot.html

## Thanks

Thanks to the following people for providing fixes and suggestions:

- 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

Portions of the SciPlot Widget source code, as marked, are Copyright (c) 1993 Alan Richardson `<mppa3@syma.sussex.ac.uk>`

###### 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
ListTree : Programmer's Reference

Web Page Design by Rob McMullen
E-mail: rwmcm@mail.ae.utexas.edu
Updated: 4 Sep 96