next up previous 524
Next: Graphical Escape Sequences
Up: Plotting Styles and Attributes
Previous: Colour Attributes

Establishing Defaults for Plotting 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:

  1. 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).

  2. Otherwise, the attribute value specified in a defaults file is used. The defaults file is found as follows:

  3. 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 up previous 524
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