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).
The SciPlot demo programs can now be built with LessTif
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.
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 provided in the widget include the following:
See the demo program information page for compilation instructions and sample programs.
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.
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 <email@example.com>.
The first X11 plotting widget that I saw was the libXG package written by Sundar Narasimhan <firstname.lastname@example.org>. 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.
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 <email@example.com>. 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 to the following people for providing fixes and suggestions:
Copyright (c) 1996 Robert W. McMullen
Portions of the SciPlot Widget source code, as marked, are Copyright (c) 1993 Alan Richardson <firstname.lastname@example.org>