.. _-l_full:

**-l**\ [*label*]\ [**+D**\ *pen*][**+G**\ *gap*][**+H**\ *header*][**+L**\ [*code*/]\ *txt*][**+N**\ *cols*][**+S**\ *size*][**+V**\ [*pen*]][**+f**\ *font*][**+g**\ *fill*][**+j**\ *just*][**+o**\ *off*][**+p**\ *pen*][**+s**\ *scale*][**+w**\ *width*]
    Add a map legend entry to the session legend information file for the
    current plot.  Optionally append a text *label* to describe the entry.
    Several modifiers allow further changes to the legend (to be built
    when :doc:`legend` is called): Use **+D** to draw a horizontal line before the
    legend entry is placed [no line], **+G** to add some vertical space [0],
    **+H** to add a legend header [no header], **+L** to set a line text; prepend
    a horizontal justification code **L**, **C**, or **R** [**C**], **+N**
    to change the number of columns used to set the following legend items [1],
    **+S** to override the size of the current symbol for the legend or set a
    length if plotting a line or contour [same as plotted], and
    **+V** to start and **+v**\ *pen* to stop drawing vertical line from
    previous to current horizontal line [no vertical line].  In addition, several
    lower-case modifiers can be set to affect the legend: Use
    **+f** to set the font used for the legend header [:term:`FONT_TITLE`],
    **+g** to set the fill used for the legend frame [white],
    **+j** to set placement of the legend [TR],
    **+o** to set the offset from legend frame to anchor point [0.2c],
    **+p** to set the pen used for the legend frame [1p],
    **+s**\ *scale* to resize all symbol and length sizes in the legend, and
    **+w**\ *width* to set legend frame width [auto].
    Default pen is given by :term:`MAP_DEFAULT_PEN`.
    Note that **+H**, **+g**, **+j**, **+o**, **+p**, **+w**, and **+s**
    will only take effect if appended to the very first **-l** option for a plot.  The **+N** modifier,
    if appended to the first **-l** option, affects the legend width (unless set via **+w**); otherwise it
    just subdivides the available width among the specified columns.
    The upper-case modifiers reflect legend codes described in :doc:`legend`, which provide more details and
    customization.  If **legend** is not called explicitly we will call it implicitly when finishing the plot
    via :doc:`end`.
