DADiSP Worksheet Functions > Function Categories > Annotation > LEGCUR

 

LEGCUR

Purpose:

Invokes a free-roaming legend cursor in the current Window.

Syntax:

LEGCUR(

target, fg, bg, font, box, margin, focus)

target

-

Optional. An integer specifying the spatial relationship of the legend to the Window:

0:

PAPER (default). The legend is located on the "graph paper" in the Window; within the coordinate system of the data. The legend scrolls with the series.

1:

GLASS. The legend is located within the plotting area of Window. The legend remains fixed in place when the series scrolls.

2:

GLASS_WMARGIN. The legend is located within the area of the entire Window. The legend remains fixed in place when the series scrolls.

3:

GLASS_WPMARGIN. The legend is located within the vertical dimensions of a Window, and within the horizontal dimensions of the plotting area. The legend remains fixed in place when the series scrolls.

4:

GLASS_WSMARGIN. The legend is located anywhere within the entire Worksheet area.

fg

-

Optional. An integer specifying the foreground color of the legend. Defaults to 1, the color of the primary series.

bg

-

Optional. An integer specifying the background color of the legend. Defaults to 1, the Window background color.

font

-

Optional. An integer specifying the font:

0:

NORM_FONT (default)

1:

SMALL_FONT

2:

STATLINE_FONT

3:

POPBOX_FONT

4:

WINLABEL_FONT

5:

TOOLBAR_FONT

6:

LISTBOX_FONT

7:

MENU_FONT

8:

USER1_FONT

9:

USER2_FONT

10:

USER3_FONT

11:

PANEL_FONT

box

-

Optional. An integer specifying presence or absence of a solid line box framing the legend. 1: ON; 0: OFF. Defaults to 1.

margin

-

Optional. An integer specifying the margin to be adjusted:

-1:

No Margin Adjustment (default)

0:

Top Margin

1:

Right Margin

2:

Bottom Margin

3:

Left Margin

focus

-

Optional. An integer specifying the focus for PAPER annotations. Defaults to 1, the primary focus.

Returns:

A legend associated with the various series in the Window.

Example:

legcur(1, 12, -1, 0, 0, -1, 1)

 

returns a legend in the current Window that does not scroll with the Worksheet, has light red text against a background the same color as the window, with small font, with the default margin style, and that has as focus the first series overlayed into the window.

Remarks:

See LEGEND to specify a legend programmatically.

 

LEGCUR derives the text it uses in the legend from the comments associated with each series in the window. Comments can be manipulated using the SETCOMMENT, GETCOMMENT, and COMMENT functions.

 

The colors available for the text and background are pre-defined in palette.mac. Refer to this file for numbers associated with your desired color selections.

 

Standard editing functions can be performed on a legend with the TEXTMOVE, TEXTEDIT, and TEXTDEL functions. These functions are easily accessed from the Drawing pull-down.

See Also:

COMMENT

GETCOMMENT

LEGEND

SETCOMMENT