Text Properties and Syntax Conventions

All options or statements that define text strings have supporting text options that enable you to set the color and font properties of the text. The following table shows some of the supporting text options that are available:
Statement Type
Option
Supporting Text Option
plot statements
DATALABEL=
DATALABELATTRS=
CURVELABEL=
CURVELABELATTRS=
legend statements
TITLE=
TITLEATTRS=
layout or axis statements
LABEL=
LABELATTRS=
text statements
TEXTATTRS=
The supporting text options all have similar syntax:
supporting-text-option = style-element | style-element ( text-options ) | ( text-options )
All supporting-text-options use a style element to determine their default characteristics. Thus, when a different ODS style is applied to a graph, you might see different fonts, font sizes, font weights, and font styles used for various pieces of text in the graph. See Attributes as Collections of Related Options for a full discussion of how style elements and override options work.
Any text that you add to the graph can have the following properties for the text-options:
Text Option
Value
Examples
COLOR=
color | style-reference
( color=black)
(color=GraphLabelText:color)
FAMILY=
" font-name " | style-reference
(family="Arial Narrow")
(family=GraphLabelText:FontFamily)
SIZE=
dimension | style-reference
(size=10pt)
(size=GraphLabelText:FontSize)
WEIGHT=
NORMAL | BOLD | style-reference
(weight=bold)
(weight=GraphLabelText:FontWeight)
STYLE=
NORMAL | ITALIC | style-reference
(style=italic)
(style=GraphLabelText:FontStyle)
Several style elements affect text in different parts of a graph. Each style element defines attributes for all of its available text options. The following table shows some of the style elements that are available for setting text attributes:
Style Element
Default Use
GraphTitleText
Used for all titles of the graph. Typically uses the largest font size among fonts in the graph.
GraphFootnoteText
Used for all footnotes. Typically uses a smaller font size than the titles. Sometime footnotes are italicized.
GraphLabelText
Used for axis labels and legend titles. Generally uses a smaller font size than titles.
GraphValueText
Used for axis tick values and legend entries. Generally uses a smaller font size than labels.
GraphDataText
Used for text where minimum size is necessary (such as point labels).
GraphUnicodeText
Used for adding special glyphs (for example α , ±, € ) to text in the graph.
GraphAnnoText
Default font for text that is added as annotation (using the ODS Graphics Editor).
For example, to specify that axis labels should have the same text properties as axis tick values, you could specify the following:
layout overlay / xaxisopts=( labelattrs=GraphValueText ) 
                 yaxisopts=( labelattrs=GraphValueText );
Style elements can also be used to modify the display of grouped data. For example, by default, the text color of data labels for grouped markers in a scatter plot changes to match the marker color for each group value. To specify that grouped data labels should use the same color as non-grouped data labels, you could specify the following:
scatterplot x=height y=weight / group=age datalabel=name
  datalabelattrs=( color=GraphDataText:Color ) ;
To ensure that a footnote is displayed in bold italics, you could specify the following:
entryfootnote "Study conducted in 2007" /
  textattrs=( weight=bold style=italic ) ;
Because the other font properties are not overridden in this example, they are obtained from the GraphFootnoteText style element.