>  Docs Center  >  Libraries  >  Daithi  >  LINE_LEGEND

LINE_LEGEND

LINE_LEGEND

Name


    LINE_LEGEND

Purpose


    This procedure plots a legend for line plots.

Category


    Graphics

Calling Sequence


    LINE_LEGEND, Position, Label

Inputs


    Position: A 2-element vector containing the position ([x,y]) in normal
        coordinates of the lower left corner of the box containing the legend.
    Label: A vector, of type string, containing the labels for each line.

Outputs


    LIMIT

Keyword Parameters


    BACKGROUND: The colour index of a background for the legend box. If not
        set, no background is drawn.
    BORDER_COLOR: An input integer giving the colour index of the border
        line. The default is !p.color.
    CHARSIZE: The size of the label characters, of type floating point. The
        default is the IDL default (!p.charsize).
    COLOR: A vector, of type integer, containing the colour index values of
        the lines. The default is the IDL default (!p.color).
    FONT: An integer specifying the graphics font to use. The default is the
        IDL default (!p.font).
    LENGTH: The length of the lines in normal coordinates.
    LIMIT: An output floating point vector containing the coordinates of the
        edges of the legend box. The format is [ left, bottom, right, top ].
    LINESTYLE: A vector, of type integer, containing the linestyle index
        value for each line. The default is the IDL default (!p.linestyle).
    NOBORDER: If set then no border line is drawn around the legend. The
        default is for a border box of colour BORDER_COLOR.
    PSYM: A vector, of type integer, containing the symbol codes. The
        default is the IDL default (!p.psym).
    THICK: A vector, of type integer, containing the line thickness value for
        each line. The default is the IDL default (!p.thick).
    TITLE: A string containing the title of the legend.

Uses


    -

Procedure


    This procedure uses the input values to construct an appropriate box
    containing the legend for a line plot.

Example


    Create a legend for a two-line plot (colours red and green).
      tek_color
      line_legend, [0.2,0.2], ['Red','Green'], color=[2,3], title='Legend'

Modification History


    Written by: Daithi A. Stone (stoned@atm.ox.ac.uk), 2000-09-18.
    Modified: DAS, 2003-02-05 (added FONT and PSYM keywords, converted LINE
        keyword to LINESTYLE).
    Modified: DAS, 2003-06-25 (added BACKGROUND keyword).
    Modified: DAS, 2005-04-12 (fixed output bugs in CHARSIZE, COLOR,
        LINESTYLE, PSYM, THICK keywords)
    Modified: DAS, 2009-10-01 (fixed so only one symbol plotted per label
        instead of two when PSYM given)
    Modified: DAS, 2010-02-19 (fixed bug which always set PSYM)
    Modified: DAS, 2010-09-16 (added NOBORDER keyword option, LIMIT keyword
        output; removed use of var_type.pro; modified documentation format)
    Modified: DAS, 2010-09-26 (fixed bug in PSYM keyword implementation;
        added BORDER_COLOR keyword)
    Modified: DAS, 2013-02-01 (set text to print in BORDER_COLOR colour)



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us