The attributes in the
GraphFonts and GraphColors style elements are used as the values for
specific style elements elsewhere in the style. In other words, the
GraphFonts and GraphColors elements are
abstract elements. They are used to assign values to other elements.
For example, the GraphFonts
element could be defined follows:
class GraphFonts
"Fonts used in graph styles" /
'GraphDataFont' = ("<sans-serif>, <MTsans-serif> ",7pt)
'GraphValueFont' = ("<sans-serif>, <MTsans-serif>",9pt)
'GraphLabelFont' = ("<sans-serif>, <MTsans-serif> ",10pt,bold)
'GraphFootnoteFont' = ("<sans-serif>, <MTsans-serif>",10pt)
'GraphTitleFont' = ("<sans-serif>, <MTsans-serif>",11pt,bold);
Each attribute, GraphDataFont, GraphValueFont, GraphLabelFont, and
so on, defines a list of fonts for use by
SAS/GRAPH whenever the corresponding
attribute is referenced. These attributes are specified elsewhere
in the style as the value of a another font attribute.
(For information about
the syntax used in the GraphFonts style element, see Font Specifications in the GraphFonts Style Element.)
For example, the GraphValueText
element specifies the font and color for tick mark values and legend
value descriptions. Suppose the GraphValueText element is defined
as follows:
class GraphValueText /
font = GraphFonts('GraphValueFont')
color = GraphColors('gtext');
The font and
color for GraphValueText are specified by elements in the GraphFonts
and GraphColors style elements.
GraphFonts('GraphValueFont')
tells SAS/GRAPH to
use the font specified by the GraphValueFont attribute in the GraphFonts
style element.
tells SAS/GRAPH to
use the color specified by the gtext attribute in the GraphColors
style element.
To change the font and
color for tick mark values and legend value descriptions, you could
modify either of the following:
-
the FONT= and COLOR= attributes
in the GraphValueText element
-
the GraphValueFont attribute in
the GraphFonts style element and the gtext attribute in the GraphColors
style element.
However, because elements
in GraphFonts and GraphColors are referred to by other elements in
the style, changing the values in GraphFonts and GraphColors result
in more extensive changes than modifying a specific style element
such as GraphValueText directly. If you modify the GraphValueText
element directly, your modifications affect only the items controlled
by GraphValueText. If you modify the GraphValueFont or gtext attributes,
then your modifications might affect other portions of the graph in
addition to tick mark values and legend value descriptions. This list
includes pie labels, regression equations, data point labels, bar
labels, and graph titles.
The styles supplied
with
SAS/GRAPH are designed to provide a consistent visual appearance
for all graphical elements in your output. Modifying attributes in
the GraphFonts or GraphColors elements instead of modifying several
specific style elements makes it easier to maintain the consistent
appearance in your output.