proc legend


Version 2.30

Scripts


Manual page for proc_legend(PL)
proc legend renders a legend using entries that you must have already supplied in previous plotting procs (usually in an attribute called legendlabel), or explicitly defined using proc legendentry one or more times.

Legend entries may be displayed one per line, or all on the same line (format). Each legend entry is accompanied by a small square of color, or a line segment, or a symbol, as appropriate. Legend entries are presented in the order given, unless reverseorder or specifyorder is used.

After the legend is rendered, the internal list of legend entries is normally cleared (this can be suppressed using the noclear attribute). It is also possible to clear the internal list without rendering any legend using the reset attribute.

See also the gallery legend examples.


Attributes

format     multiline | singleline

Controls the overall format of the legend. multiline gives entries that are placed downward on multiple lines. singleline gives entries that are placed across all on the same line.
Example: format: singleline

location     x y

Location for the legend. x will correspond to the beginning of the label (line segments, color squares, etc. will appear to the left of this). y will correspond to the top of the legend.
Example: location: min+1.0 max


Controlling appearance details

sep     n

Amount of separation between entries. Absolute units.

seglen     n

If specified, controls the length of line segments. Absolute units.

swatchsize     n

If specified, controls the size of color sample square. n is the length of one side in absolute units.

outlinecolors     yes | no

If yes, color samples will be outlined. Normally they are not, except for white.

textdetails     textdetails

Details regarding the rendering of the legend text entries.

colortext     yes | no

If yes, entry text inherits the color of the sample. Normally it does not. Example.


Controlling the order of legend entries

specifyorder     multiline-text

If specified, allows the order of legend entries to be controlled explicitly. Also allows entries to selected/omitted. (Normally, entries are rendered in the order that they were added and all entries are rendered.) multilinetext should have one line for each entry to appear in the legend. Each line will be compared against all defined legend labels. Upon a match, that entry will be rendered. The comparison is case-insensitive. Only the first few characters (enough to uniquely match) need be given in the specifyorder attribute.
Example:
specifyorder: 
   Jean
   Jan
   Joan
   John
   Juan
Other Gallery examples: timeline2 and km2

reverseorder     yes | no

If yes, entries are rendered from last to first.


Clearing the legend entry list

reset

If specified, no legend will be rendered and the internal list of legend entries will be cleared. This might be useful in situations where a number of cloned plots (and cloned legendentries) are being done, but only one actual legend is desired. Example:
    #proc legend
      reset:
   

noclear     yes | no

If yes, the defined legend entries list is not cleared. Normally they are cleared out after the legend has been rendered. This is useful in rendering multi-column legends.
Example: this is used in Gallery example propbars1


data display engine  
Copyright Steve Grubb


Markup created by unroff 1.0,    August 25, 2004.