DADiSP Worksheet Functions > Function Categories > Annotation > LINEANN

 

LINEANN

Purpose:

Draws a polyline between specified coordinates. Use the newer LINEDRAW function for more options.

Syntax:

LINEANN(

color, style, target, match, focus, width, x1, y1, ..., xN, yN)

color

-

Optional. An integer or macro color name (e.g. RED) specifying the line color. Defaults to color of primary series.

style

-

Optional. An integer specifying the line style:

1:

Solid (default)

2:

Dashed

3:

Dotted

target

-

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

0:

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

1:

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

2:

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

3:

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

4:

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

match

-

Optional. An integer that sets the line color to match the color of the selected overplot. Defaults to 1 (primary series). –1 implies use color parameter.

focus

-

Optional. An integer specifying 1-based focus offset for PAPER annotations.

width

-

Optional. An integer specifying the line width in pixels. Defaults to 1.

x1, y1, xN, yN

-

Real number coordinates representing endpoints of each line segment.

Example:

gtri(100,.01,2);lineann(purple,2,1,-1,0.09,0.04,0.9,0.5)

 

creates a purple dashed (2) line in "glass mode" (1). The color of the line is purple, and is unrelated to any overplots ( -1); the line spans from coordinates (0.09, 0.04) to (0.9, 0.5).

 

The following lines accomplish the same result:

 

gtri(100,0.01,2);

addwform("lineann(purple,2,1,-1,0.09,0.04,0.9,0.5)");

pon;

Remarks:

In general, the newer LINEDRAW function replaces LINEANN.

 

To use LINEANN from the command line, it must be appended to the current Window formula or enclosed in a ADDWFORM command. This adds the command to the Window formula. Use PON to see the effect. Because it is a plottime function, LINEANN() is reevaluated on every redraw.

 

The newer LINEDRAW automatically adds the line drawing commands to a Window and does not require ADDWFORM.

 

To use the default value for any integer parameter (from target to focus), use -1 as the argument to LINEANN.

 

All polylines created with a single call to LINEANN (or LINECUR) are displayed in the same color. Specify the color explicitly for a polyline by using the "color" argument or by supplying an overplot index number.

 

The overplot index match lets you associate a polyline annotation with a specific overplot, by guaranteeing that the polyline color will be the same as the overplot color.

 

When setting an index match, use 1 to refer to the color of your primary series; use 2 to refer to the color of your first overplot; 3 for your second overplot, etc..

 

The rules for determining the drawing color used for LINEANN (or LINECUR) follow. If a color is supplied as the first argument, that color will be used to draw all polylines. If -1 is specified as the first argument, DADiSP checks the overplot index match, the fourth argument. If an overplot index is specified, DADiSP draws all polylines using the color that corresponds to the index. If the color argument is -1 and the overplot index is -1 (or omitted), DADiSP draws the polylines using the color of the primary series.

See Also:

ADDWFORM

LINECOPY

LINECUR

LINEDEL

LINEDRAW

LINEMOVE