The LEGENDITEM statement
creates a definition for a legend item that can be included in a legend.
The item that you define is independent of the data and enables you
to customize the legend to enhance or replace a standard legend. For
example, to display annotation text within the legend area, you can
define a LEGENDITEM statement with TYPE=TEXT and specify the text
in the TEXT= option.
As demonstrated in the
LEGENDITEM Example Program, multiple LEGENDITEM statements can be used to replace
a plot statement’s data-driven legend by defining custom legend
items to display in the legend. This use enables you to communicate
information that is not in the data. For this use, you would define
one or more LEGENDITEM statements to specify legend attributes, and
then reference those items in your legend statement. You must not
reference the plot statement itself in the legend statement. Although
no direct connection would exist between the plot data and the legend,
you could communicate the connection by managing the visual attributes
in both the plot and the legend.
The LEGENDITEM statement
must be located within the BEGINGRAPH block but outside of the outermost
layout block. You can use multiple LEGENDITEM statements to define
multiple definitions. In that case, each definition specifies a single
legend entry and each item name must be referenced in the legend statement.
Note: A single legend statement
can reference multiple item names and also multiple plot names.
When specifying attribute
options for a particular LEGENDITEM statement, options that do not
apply to the specified TYPE= value are ignored. For example, the MARKERATTRS=
option sets the attributes for a marker and is useful if you set TYPE=MARKER
or TYPE=MARKERLINE. However, if TYPE= is set to a value that does
not display a marker symbol, the MARKERATTRS= option is ignored.