Next: Graphical Escape Sequences
Up: Plotting Styles and Attributes
Previous: Colour Attributes
When an application needs a plotting style, it uses a style parameter
to get a group of attribute settings. But what values are used for
attributes which are not included in this group?
Obviously, if an attribute has been assigned an explicit value using the
parameter then that value is used, but you should note that most styles
are `sticky'.6 That is, once a group of attribute
settings has been specified for a style parameter, that group continues
to be used by subsequent applications until a new group is supplied for
the parameter. If the group is supplied within a text file, then the
`current value' stored for the parameter is the list of attribute
settings read from the file, not the name of the file. Thus,
changing the contents of the file at a later time will have no effect on
the value used for the parameter unless you re-specify the parameter on
the command line.
If an attribute is not specified in the supplied group, then a default
value is used for the attribute, determined as follows:
- If the plot is being overlayed on another existing plot, then the
value which was used for the attribute when the existing plot was
created is used (but only if it was set to an explicit value).
- Otherwise, the attribute value specified in a defaults file is
used. The defaults file is found as follows:
- If the environment variable KAPPA_<APP>_<PARAM> is defined (where
<APP> is the name of the application e.g. DISPLAY, and
<PARAM> is the name of the parameter, e.g. STYLE, both
in upper-case), its value is taken to be the full path to
the defaults file.
- If KAPPA_<APP>_<PARAM> is not defined, the file $HOME/kappa_<app>_<param>.def is used (where <app> and
<param> are in lower case this time).
- If the file $HOME/kappa_<app>_<param>.def cannot be accessed,
the file
$KAPPA_DIR/kappa_<app>_<param>.def is used.
- If the file $KAPPA_DIR/kappa_<app>_<param>.def cannot be
accessed, then the value of the environment variable
KAPPA_<PARAM> is used as the full path to the defaults file.
- If KAPPA_<PARAM> is not defined, the file $HOME/kappa_<param>.def is used.
- If the file $HOME/kappa_<param>.def cannot be accessed, the file
$KAPPA_DIR/kappa_<param>.def is used.
- If the above process failed to produce a value for the attribute
(either because no file was found, or the file did not contain a setting
for the attribute), then the default value supplied by the AST library is
used. These defaults are included in the full description of the relevant
attributes later in this section.
From the above, you can see that defaults can be specified either for
individual applications, or for all applications (any application-specific
defaults file will be used in preference to the general defaults file).
It should be remembered that settings for unknown attributes are ignored,
and do not cause the application to abort.7 So if you set a
value for an attribute and it seems to have no effect, it may be worth
checking that you have used the correct spelling for the attribute name.
Next: Graphical Escape Sequences
Up: Plotting Styles and Attributes
Previous: Colour Attributes
KAPPA --- Kernel Application Package
Starlink User Note 95
Malcolm J. Currie & David S. Berry
2008 June 14
E-mail:ussc@star.rl.ac.uk
Copyright © 2008 Science and Technology Facilities Council