ploticus: proc legend

## proc legend | Welcome Gallery Handbook |
| Manual page for proc_legend(PL)

## DESCRIPTION

Renders a legend.`` proc legend uses entries that you must have already supplied in previous plotting procs (usually in an attribute called `legendlabel`).`` You can also explicitly define legend entries using proc legendentry one or more times. If this is not clear, check the example.``

For bars, each legend entry is shown with a small square sample of color.`` For lineplot and curvefit, a small segment of the line is shown.`` For scatterplot, a symbol is shown.`` By default, legend entries are presented in the order that the plotting procs (or proc legendentry invocations) were executed.`` The order can be reversed (`reverseorder`) or controlled explicitly (`specifyorder`) if desired.``

Legend entries may be displayed one per line, or all on the same line (`format`).``

If a HTML clickmap is being generated, legend entries may be mapped to URLs. See clickmaps page for details.``

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.``

## EXAMPLES

See the Gallery Legends examples

## PREREQUISITES

Plotting proc(s) containing a `legendlabel` specification, and/or proc legendentry must have already been executed.``

## MANDATORY ATTRIBUTES

None.

## 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`

textdetails textdetails

  Details regarding the rendering of the legend text entries.``

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.``

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.``

colortext `yes` | `no`

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

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

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.
  data display engine
  Copyright Steve Grubb

Markup created by unroff 1.0, `` `` December 10, 2002.