A group expression is a character string containing a list of one or more sub-strings separated by some specified delimiter. The usual delimiter used when accessing plotting style parameters is a comma (although other parameters which require group expressions for other purposes may use a different delimiter). Each sub-string is known as a group element. Each group element must be either:
"^"'').
If a group element starts with an up-arrow character, then the rest of
the element is interpreted as a file name, and an attempt is made to read
further group elements from the specified file. Each
line in the file is interpreted as a group expression in its own right,
using exactly the same rules as described above. In particular,
references to text files can be nested (i.e. a text file can
include a group element which refers to another text file). Blank lines
and lines in which the first non-blank character is a hash ("#")
are ignored and can be used to add textual comments to a text file.
Attribute settings are used in the order in which they occur in the group expression. If a group expression includes more than one setting string for a given attribute, then the value which occurs nearest to the end of the group expression will over-write any earlier values.
All this means that there are several ways in which plotting styles can be supplied. The simplest method is probably to store all your attribute setting strings in a text file, one per line, and then just give the name of this text file (preceded by an up-arrow) as the value for the STYLE parameter. For instance, the file style.dat may contain:
# A test plotting style width=2 edge(2)=right title=This is my title
The first line and the following blank line are ignored. The remaining three lines specify three attribute values to use. When running an application such as DISPLAY, this style file would be specified on the command line as follows:
% display style=^style.dat
Alternatively, you can specify the setting strings explicitly on the command line. This can get a bit messy because you need to protect special characters (commas, parentheses, spaces, equals signs, and so on) both from the UNIX shell and from the parameter system. One safe way to do this is to enclose the whole group expression in single quotes, and then enclose the whole thing again in double quotes.5So the above style could be given on the command line as follows:
% display style="'width=2,edge(2)=right,title=This is my title'"
A bit messy as I said! However, it can be useful to combine this method with the previous method. If you have a long, complicated style file, and you want to change one or two attribute settings, one method would be to take a copy of the style file and edit it. This would probably be the best thing to do if you intend to re-use the edited style file several times. But if you just want to try a quick experiment, just to see what the results look like, you can avoid the trouble of editing the style file by giving both the original style file and the new attribute settings on the command line. For instance:
% display style="'^style.dat,width=3'"
This reads the contents of our test style file style.dat, which includes the attribute setting width=2. It then also applies the attribute setting width=3, over-writing the effect of the Width value included in the style file. If you wanted to try temporarily changing the value of several attributes at once, you could put the new attribute settings into a second file, say style2.dat, and then run the application as follows:
% display style="'^style.dat,^style2.dat'"
Again, the contents of style.dat would be read, followed by the contents of style2.dat, over-writing any settings for the same attributes included in style.dat.
KAPPA --- Kernel Application Package