PGPLOT Wishlist

This is a list of requested improvements that I am considering for possible implementation in future versions of PGPLOT. No promises are implied! If you have other suggestions, or want me to give high priority to any of the suggestions, please let me know.

A double precision version of the library
Maintaining two parallel versions of the library is time-consuming, and I do not wish to do so unless there is a clear need. None of the graphical operations in PGPLOT require double precision calculations to achieve the accuracy warranted by current graphics devices, so it is mainly a matter of convenience for programmers who maintain their data in double precision for other reasons. Some users have reported success using Fortran compiler qualifiers to cause REAL variables and constants to be compiled as double precision; but note that you must also change some of the C support code and drivers.
Rotated coordinate systems
Extend the world-to-device-coordinate transformation to allow rotation as well as scaling and translation. This would allow world-coordinate axes that are not parallel to the edge of the viewport, and would hence cause complications for routines like PGBOX that label the viewport in world-coordinate space.
Positioning workstation windows
Unfortunately there is no way from within a PGPLOT program to control the location of PGPLOT X-windows. I will consider adding a new subroutine to the API to specify this, but there are some potential problems: how should other devices (not X-window) interpret this? and some X-window managers do not honor position requests.
Opaque symbols
An option to make the graph symbols opaque, so that underlying graphics do not show through (e.g., a circle symbol would consist of a filled disk in the background color, surrounded by a ring in the current color, instead of just the ring). There should be solid and open versions of each symbol.
User-defined symbols
A method of defining new symbols that can be used as graph-markers like the built-in ones.
Bar and column charts
An example program is included in PGPLOT v5.2.0 (pgdemo16), and I intend to include the subroutine in the main pgplot library in a future version. Comments on the design of this subroutine are solicited.
Surface Plots of 2-D arrays and functions
To do this properly requires full three-dimensional graphics capability, which is beyond the scope of PGPLOT. However, a restricted implementation might be possible. Meanwhile, see demo program pgdemo7.f.
Variable line width
Allow line width to be a real/float parameter rather than an integer (this would require new routines: PGSLW and PGQLW would not be changed).
Control of dashed-line appearance
The ability to set the scaling of the dashed (or dotted or dash-dotted etc.) line-styles and alter the dash pattern.
Color
Provide a way to determine whether the active device is true-color or pseudo-color (with a dynamic lookup table).
String input
Put a prompt on a plot and then read back a number or string with echo, editing, etc. A prototype subroutine to do this is include in pgdemo14 in version 5.1.0; more work is needed before it can be included in the PGPLOT library.
Journalling
PGPLOT should be able to save the plotting instructions used to create the current picture so that they can be used to regenerate the picture on another device (e.g., PostScript copy of the current X window display). Eileen Berman has implemented something along these lines by calling the metafile driver in parallel with the active device driver, but this has some problems that need to be sorted out before it can be generally implemented.
Improved cursor input
Extension of PGCURS/PGBAND to return more information about the key-stroke, e.g., whether it came from the keyboard or the mouse, and the state of modifier keys (shift, control, etc.); for devices for which this is possible. New routine to return cursor position immediately, without waiting for a keystroke or other event.
Support for PostScript or other native fonts
Allow use of arbitrary PostScript fonts on PostScript devices (and possibly X-window fonts on X-window devices).
One or more mono-spaced fonts
Useful for lining things up in columns. (Implementation of tab-stops in text might help here too.)
Eight-Bit Character Set
At present, the PGPLOT routines for displaying text only handle the 7-bit US-ASCII character set (decimal codes 32-126); some other characters can be obtained with escape sequences. I propose to implement all the printable characters of the 8-bit ISO 8859-1 (Latin-1) character set, and possibly provide a way to specify a different character set. I will also add the `gothic' Hershey fonts for those who find them appealing. Some people have requested ways to define their own fonts or add symbols to the font file; I will look into methods of accommodating this.
Additional Characters
e.g., Greek cursive pi (varpi).
Alternate syntax for text
A request has been made for an alternate syntax for subscripts, superscripts, etc.; possibilities include LaTeX/TeX or HTML. This would only be desirable if it follows an already established standard.
  Current:     e\ui\gp\d
  LaTeX:       e^{i\pi}
  HTML:        e<sup>i&pi;</sup>
Ability to change color within a text string
e.g., with an escape code to specify the color index.
Improved support for C
Shared version of libcpgplot; support for PGERRX etc.; better documentation. Meanwhile, you can make a shared version of libcpgplot using commands like the following (the ld options are highly system dependent)
ar -xv libcpgplot.a
ld -o libcpgplot.so -z text -G -i cpg*.o -L . -l pgplot
rm -f cpg*.o
Improved Contouring Routines
Improved Imaging Routines
Axes
A user has requested the option of putting tick marks at non-integer multiples of the interval, e.g., 0.5 - 2.5 - 4.5 - 6.5.
A user has requested logarithmic axes with bases other than 10.
Log axes that span 1 decade or less not labeled very well.
A more intelligent version of PGLAB that could figure out where to put its labels without overlapping with numeric labels on the axis would be nice.
More control over the format of numeric labels is needed; e.g., to specify a fixed number of decimal places.
A means to suppress labels at either end of an axis when they would overlap an adjacent plot; e.g,., options in PGBOX.
Date Axis
An option in PGAXIS to treat a world-coordinate as a time or date (e.g., Modified Julian Date) and label the axis with, e.g.:
hours, minutes, seconds
year and day
year, month and day
month and year
day of week.
Legends
A convenient way to produce a legend for a plot: i.e. a list of symbols, line-styles, etc. with associated text. A general solution is quite difficult.
VMS Installation Procedure
This does not contain a way to extract the documentation from the source code.
Circles and Arcs
Add a circle/arc primitive to the driver interface. Add a PGARC routine for drawing partial circles (specified by center, radius, and two angles).
Window titles
Add a subroutine to modify the window title on X-window and similar devices that put a title bar on PGPLOT windows.
Query routine: number of open devices
A new routine to return the number of open devices and their PGPLOT IDs.
PGPAP
This routine should indicate to the caller when it has failed to allocate a view surface of the requested size.
Cubic splines
PGPLOT draws curves by linear interpolation between a set of points (straight-line segments). I plan to add a routine to draw a smoother curver through the points, e.g., a cubic spline. Smoothing measured data, i.e., drawing a smooth curve that does not pass through all the points, is beyond the scope of PGPLOT. The choice of the best way to smooth the data depends on the characteristics of the data, and you should smooth the data with an appropriate method before passing them to PGPLOT.

Device Drivers

Driver for CGM (Computer Graphics Metafile)
This is an official standard interchange format, but not widely adopted. David Billinghurst has contributed a driver, layered on CD from NIST. I am testing this driver, and hope to include it in a future version of PGPLOT.
Driver for FIG format
It would be nice to have an editable graphics format, but PGPLOT will not be able to easily take advantage of XFIG's capability, for two reasons: (1) text will appear in the output file as vectors, not characters, and so will be difficult to edit; (2) PGPLOT doesn't structure the file into hierarchical `objects', which would be convenient for editing. Extensions to PGPLOT might make these features possible.
GIF driver
Add option for transparent background.
GIF/PPM/XWD drivers
Rewrite in C for improved portability (these drivers all use dynamic memory allocation, which is not possible in standard Fortran-77).
PostScript driver
PostScript and other drivers
Mechanism (e.g., environment variable) to set paper size to e.g., A4 instead of US-letter. Ideally this should work with all printer drivers.
X-Window driver (/XW, /XS)

PGPLOT
Tim Pearson, California Institute of Technology, tjp·astro.caltech.edu
Copyright © 1995-1999 California Institute of Technology