Navigation:  Programmer's Reference > Sending data to DPlot from another application >

LegendParams macro command

Print this Topic Previous pageReturn to chapter overviewNext page

Macro commands may be used either in macros or by sending the commands to DPlot via dynamic data exchange (DDE). Some commands are valid only in macros (noted by Macros Only). Commands sent to DPlot via DDE must be enclosed by square brackets [     ]. Macro commands should not include the brackets.

Command parameters shown in the descriptions below are placeholders for the actual values. Command parameters are either numeric values, equations that evaluate to numbers, or character strings. Character string parameters are always bound by double quotation marks. Equations must be preceded by an equals sign (=).

The pipe symbol (|) in the command syntax indicates that a parameter is optional, and should not be included in your macro unless otherwise noted.

All indices into arrays are 1-based, e.g. Curve1=1 refers to the first curve in a plot.

A 0x prefix for numbers in the descriptions below indicates hexadecimal notation; e.g. 0x0010 = 16.

JR/Viewer indicates that the command is supported by DPlot Jr or DPlot Viewer.
JR/Viewer indicates that the command is NOT supported by DPlot Jr or DPlot Viewer.


 

[LegendParams(linelength,maxrows,frame,
opaque,x,y,nSymbols,alignment,bkcolor)]

JR   Viewer

Sets various parameters for the legend. All parameters must be separated by commas. All parameters are optional; omitted parameters are denoted by two successive commas with no intervening spaces.

linelengthlength of the line segment (in inches) appearing beside each legend string.
maxrowsmaximum number of legend strings to place in one column.
frame= 1 to draw a rectangle around the legend.
= 0 for no frame.
opaque= 1 to hide all objects intersecting the legend.
= 0 for a transparent legend.
x,ythe location of the legend, expressed as a percentage of the plot window size (0.0 to 1.0).
nSymbolsnumber of symbols to use in each legend entry, when symbols are used. Limited to 0-3, inclusive.
alignmentdefines how the legend is aligned relative to the specified location. Combination of horizontal and vertical alignment codes:

Horizontal

Vertical

0 Left

0 Top

1 Center

4 Middle

2 Right

8 Bottom

bkColorsets the background color of the legend. If omitted or set to -1, the legend background will be the same color as the plot background (set with BkColor). This value is ignored if the legend is not opaque.

Examples:

[LegendParams(1.5)]

sets the length of the line segments used in the legend to 1.5 inches.

[LegendParams(,,1,,,,1)]

draws a frame around the legend and sets the number of symbols used to 1.

[LegendParams(,,,,,,,10)]

sets the alignment point to the lower right corner of the legend.

[LegendParams(,,,1,,,,,0x00FFFFC0)]

makes the legend background opaque, filled with a light cyan.

 


Page url: https://www.dplot.com/help/index.htm?legendparamscommand.htm