C-PLOT

Scientific Graphics and Data Analysis

changes

highlights of modifications for C-PLOT release 4.0.00

DESCRIPTION

These release notes describe some of the many changes made for C-PLOT release 4.0 from C-PLOT release 3.6d, as of July 1, 1993.

Three-Dimensional Plotting

New commands 2d, 3d, vi, bo, sw, st and tw are available for three dimensional plots. Read the help files on the individual commands for more information.

X-Error Bars

Error bars in the x direction are now available. The syntax of the eb command has been changed to accept x, y or z arguments. See the eb help file for details.

Drawing Half Error Bars

Appending a + (-) immediately after the b in the pb or zb commands will result in just the top (right) or bottom (left) side of the y ( x ) error bars being drawn.

Passing Commands to Fits

You can now pass a series of commands to fitting (type 5) user functions using the following syntax:

fn  fit.5 - cmd1cmd2;...
fn  . - cmd1cmd2;...
fn  - cmd1cmd2;...

The second and third examples use the currently executing function. Each semicolon-separated command in the argument list is just what you would enter on each line of input if you were running the fitting function interactively. For example, the command

fn - md; 0; 10; 100

would make 101 data points from 0 to 10.

Shared Command Files

You can now use a single command file to combine plotting and fitting. Use the following syntax with the do and mk commands from the plot program:

fn fit .5 -
*( ... commands for the fit function ... )*
ex

or, to continue with the same fitting function as already initialized,

fn -
*( ... commands for the fit function ... )*
ex

The commands between the fn and the ex will be executed by the fitting user function. Commands after ex will be executed by the plot program.

Saving Current Format

A new command is available to help in saving the current formatting information to a file. Typing

sf  file_name

will write the commands and parameters that reflect the format of the current plot to file_name in a format suitable for use as an input command file.

Long Input Lines

You can now continue long input lines for most commands by typing a backslash, <return>,then more text. The total length of the input text can't exceed 1,024 characters.

Custom Function Compilation

You can now have commands for compiling your user functions embedded in the function's source file. This feature is useful if your function needs to be linked with other modules in addition to the standard overhead modules. The custom compiling commands are found by looking for a line in the function source file containing the string cplot_compile: followed by other text. The other text on the line is passed to /bin/sh as a command and executed from the directory of the user function. The command can refer to the make utility or invoke the C compiler directly. Possible ways of including the information in a function source file are:

/*
*    cplot_compile:  make my_func.5
*/

or:

#if 0
    cplot_compile:  make my_func.5
#endif

Window Erase

A new drawing command, zE,erases the area within the current window. The color of the erased area is set to the current background color. You can use this to erase rectangular portions of a plot, perhaps before writing annotation text over the erased area.

In-Line Pen Control

A new special text sequence, \eP' # ',changes the current pen to the value given by #.

Fills With Line Control

The line-control feature has a new capability. As before, a value of one in the line-control column of a data file indicates that a new line should start at that point, while a value of zero indicates that the line should be continued to that point from the previous point. With the new feature, a value of two in the line-control column means that in addition to starting a new line at the point, the line resulting from the subsequent points should be closed and filled with the current white fill color. (Fills are not available on all plotting devices, although the most widely used output formats, including PostScript, X Windows, SunView and VGA/EGA/Hercules have fills.)

Silent Flag on Invocation

A new invocation flag is -s,for silent mode. This flag is useful when C-PLOT is used with an independent front-end program.

New Distribution File Hierarchy

The C-PLOT distribution has been reorganized so that all files are in one directory hierarchy, /usr/cplot, by default, or by a path given by the CPLOTHOME environment variable. Also, one need only extract the directory from the distribution media; it is no longer necessary to run an installation program.

Real-Time Plotting

You can now arrange to have C-PLOT continually read from a source of data and update a plot as new points appear. The source of the data is selected with the gd command, as usual. Adding a @ character to the end of the gd command line turns on the real-time feature. At the time you plot the points, the program will first draw the points currently in the file. The program will then continue to check the file to see if more points have been added and plot those as they appear. If the end-of-file character (ASCII \004)or the two characters ^D are read from the file after a newline, the program stops reading the file and proceeds to the next command if running from a command file, or to the PLOT-> prompt if running interactively. You also can use a ^C to interrupt the reading. In the present implementation, the program sleeps for one second between checks for new data.

Easy Filter Spooler Configuration

A new filter configuration file $CPLOTHOME/filters/spoolers can be used to assign the spooler command and options to be used with a particular filter. See the comments in $CPLOTHOME/filter_tools/spoolers for configuration instructions.

Two Active Graphics Filters

You can now have two graphic filters active at the same time for the z commands. Use the commands zf1... and zf2... to direct commands to one filter or the other. Once a filter is selected, it remains the target of z commands until the other is selected. The default filter is filter one. The command zf entered by itself will cycle through the filters.

New Set Selected Parameters Command

A new se command is available to set certain parameters. At present, these parameters are the dashed-line pattern repeat distance, tick length, line spacing in the annotation and key, command file directory, data directory and function directory. See the se help file for more information.

New APS-Style Labels Plot Type

You can select APS (American Physical Society) style labels by adding 1024 to the general plot-type flags. APS-style labels have parenthesis around the units and no multiplication sign in front of the scale factor. For dimensionless quantities, the inverse of the scale factor is placed in front of the label with no parenthesis.

Warning On Nested Invocation

C-PLOT now adds an environment variable named CPLOTLOCK to the environment when you execute a subshell with the u command. C-PLOT checks for the presence of that variable each time it starts. If you start C-PLOT from the subshell, you will get a warning message explaining the situation. The message suggests you exit the redundant instance of C-PLOT and the subshell and return to the already-running C-PLOT.

Saving Data in Binary Format

A new -b option to the sa command allows you to save data in a binary format suitable for reading back with the gd 13 or gd 14 commands. Binary data files can be read in and written out faster than ASCII files and also generally smaller in size.

Improved Log Axis Numbering

It is now possible to number the intermediate tick marks on log axes. By default, all eight intermediate ticks are numbered if the axis contains only one decade. If the axis contains three or fewer decades, the ticks with mantise two and five are numbered. If the minimum and maximum of the log axis lie between 1e-3 and 1e+3, the numbers for both the major and intermediate ticks marks are drawn in decimal notation. Otherwise, the major tick numbers are drawn in power-of-10 notation. If intermediate ticks are numbered in this case, they are numbered with single digits one through eight, or two and five, as appropriate.

You can force how many of the intermediate ticks are numbered using the user-defined ticks feature available with the ro or ty commands. You also can force the major ticks to be numbered with power-of-10 notation by selecting plot type 32 for any of the axes.

Display of Available Filters

The zi command now prompts with available filters if used without an argument. The available filters are taken as all files (with certain exceptions) in the $CPLOTHOME/filters directory. A shell script filters/lsfilters (if it exists) is used to select the file names for display.

Passing Options To Filters

You can now pass options, including the spooler command, to C-PLOT graphics filters. The filters psfilter, hpjet, hpgl2 and x11 take options to set various modes. There are help files for each of the above filters that describe the options in detail. Also, see the zi help file for more information on specifying filter options.

Formatted Help Files

The help files for C-PLOT are now formatted on the fly to fit the size of the current text window, which may depart from the standard 24x80 CRT screen size. In addition, the help files now display key words in bold text, if bold text is available on your display. The help perusal program now responds to page-backwards and page-forwards commands on single key strokes.

Enhanced Syntax For Character-Size Command

The character-size command, cs, will prompt for values for just one of the text categories if the text category letter appears as a single argument. For example,

cs s

will prompt for the height, height-to-width ratio and slant for just the symbols.

Enhanced Syntax For Enter-Text Command

The enter-text command, tx,can be invoked with one argument to limit which text strings are prompted for or with two or more arguments to enter the text for one string on a single line, as in

tx t This Is the Title

See the tx help file for more information.

Enhanced Syntax for Do Command File Command

Without arguments, the do command will include the name of the current command file in the prompt and let you use that as the default.

Constraints Available For Fit Parameters

In the parameter-initialization structure in the fitting-function prototype files, there is now a provision for entering upper and lower limits for the adjustable parameters. There also is a new lm command in the fits that lets you change the parameter constraints while running the fit. Parameters will not be allowed to go below the lower limit or above the upper limit during the fitting. If the fit converges with a parameter at a constrained limit, an error message is included in the fit results.

New Fit Command To Calculate Chi Squared

The fitting functions have a new command, ch, to calculate chi-squared values without fitting. The current data ranges and parameter values can be used or parameters can be passed on the command line. This command might be useful for adjusting parameters by hand.

New Fit Commands To Set Data Exchange Mode

New 2d and 3d commands in the fit determine how the fit data is exchanged with the plot program for the md, mr, pg and ps commands when there is more than one independent variable in the fit. See the fit help file for details.

New Variation On the Fitting Algorithm

There are now two variations on the fitting algorithm. The second variation is only relevant when you do not provide analytic derivatives for all the fitted parameters. For certain fitting functions you may be able to make your calculations more efficient with the second variation (at the expense of much more memory usage). Both variations produce the same fit results. See the file $CPLOTHOME/prototypes/README for more information.

New Rule For Choosing Function

When public and private functions share the same name, the private version will now be used.

The Type Command Can Prompt For User Ticks

If you run the ty command so that it prompts for each possible plot type, you will now be prompted for tick parameters if user-defined ticks are selected.

Error-Bar Mode No Longer Changed With Get Data Command

Previously, entering a non-zero column number in gd modes 3, 5, 8 or 12 would turn error-bar mode on, while a column number of zero would turn error-bar mode off. Entering a non-zero number for error-bar columns now causes data to be read into the corresponding internal data array, but doesn't change whether error-bar mode is on or off. Entering a zero column number causes the internal data to be set to zero. Entering a negative column number leaves the internal data unchanged.

Triangles and Stars Now Geometrically Centered

The positioning of triangle symbols (numbers 2, 3, 6, 7, 10, 11, 27 and 28) and star symbols (numbers 12 and 13) has been changed to have the symbols centered symmetrically over the data point, rather than centered based on the enclosing character box.