Navigation:  Menu Commands > Text Menu >

Legend/Labels command (Text menu)

JR   Viewer

Print this Topic Previous pageReturn to chapter overviewNext page
Show/Hide Hidden Items

Enter or edit curve legend, labels, or legend title.

You can embed placeholder codes for certain data parameters (minima, maxima, standard deviation, etc.) in the legend entries and legend title that will be replaced with the corresponding numeric values when the plot is drawn. You can also present the results of equations within the text of the legend. For more information on placeholder codes see the Text Placeholders topic.

Each of the legend entries may include line breaks so that the text spans multiple lines. To break a string into 2 or more lines, embed a "\n" sequence in the string (for C programmers, that is the actual characters \n, not a linefeed character).

Maximum number of characters

Character strings for the legend are limited to 80 characters. Curve labels are limited to 40 characters, and are placed beside the last data point that is located within the plot window.

Legend title

The legend title will be placed above the legend for each of the individual curves. If no legend is specified for any curve, the legend title may still be used to draw a note on the plot.

Curve label
Curve labels are (usually) short text strings drawn adjacent to the last data point in a curve, or adjacent to the first intersection of a curve with the boundary around the plot. This might be useful when a plot is a bit too crowded to draw a proper legend.

Hide legend entry for this curve

Check this box to hide an individual legend entry, but not the associated curve. This option might be useful for developing two or more views of a graph in a case where you want to show all curves, but not the complete legend because of its size, for example.

Legend line length

Length of the line segment appearing to the left of each legend string. The line is drawn with the same attributes (color, style, and pen width) as the associated curve.

Maximum number of rows

Refers to the maximum number of text lines that will be placed in a single column, not including the legend title. Additional columns will be used if the number of lines exceeds this value. DPlot will not break a single legend entry containing line breaks (\n) into separate columns.

Number of symbols to use

Specifies how many symbols are drawn in each legend entry (for curves that use symbols). Limited to 0-3. Note that DPlot does nothing to ensure these symbols will not overlap; symbols in the legend are drawn the same size as the corresponding symbols in the plot. The width of the area used to draw symbols is controlled solely by the Legend line length entry.

Frame legend

Check this box to draw a rectangle around the legend.


Check this box to hide items that intersect the rectangle bounding the legend.

Hide Legend

Check this box to hide (not draw) the legend.


Enter the X and Y coordinates of the anchor point of the legend, expressed as a fraction of the plot dimensions. (0,0) is at the top left corner of the plot; (1,1) is at the lower right corner. The legend will remain in the same position relative to the plot if you zoom or otherwise change plot extents. Coordinates outside the limits 0-1 are interpreted as legend character sizes. For example (-1,-1) will place the legend anchor point at 1 character width to the left of and 1 character height above the top left corner of the plot.

Anchor Point

You can specify how the box surrounding the legend is aligned with the specified Location coordinates.

Character formatting

The legend title and individual legend character strings may include formatting codes for subscripts, superscripts, etc., as described below. For overbar, dot accents, or Wingdings fonts see Format Codes below.

To use subscripts, select the text (highlight using the cursor) you want to format as subscript, then click this button. Shortcut: CTRL+

To use superscripts, select the text (highlight using the cursor) you want to format as superscript, then click this button. Shortcut: CTRL+

To insert special characters (Greek letters, trademark symbols) found in the Symbol font, click on the insertion point, then click this button. Shortcut: CTRL+S

NOTE: On versions of Windows older than Vista, the Symbol font with normal weight may only be available in a horizontal orientation. Bold weight can generally be rotated to any angle. This limitation is of course important for the Y axis label on all plot types, and all axis labels in 3D views.

To make a portion of the text bold, select the text (highlight using the cursor) you want to format as bold, then click this button. Shortcut: CTRL+B

To make a portion of the text italic, select the text (highlight using the cursor) you want to format as italic, then click this button. Shortcut: CTRL+I

To make a portion of the text underlined, select the text (highlight using the cursor) you want to format as underlined, then click this button. Shortcut: CTRL+U

To double the size of one or more characters, select the applicable characters (highlight using the cursor), then click this button. Shortcut: CTRL+2

To use a custom color on a portion of the text, select the text (highlight using the cursor) you want to draw using a different color, then click this button. Shortcut: CTRL+K

Format codes

The formatting buttons simply insert special characters into the text that have specific meaning to DPlot. Use of these buttons is not strictly necessary - you can of course physically type these codes with the same result. Format codes may be nested, so you can have (for example), subscripted Greek characters or subscripts of subscripts. Note that the bold, italic, and underline codes will have no effect if the font already possesses that attribute. In other words, using {\b} on a bold font will not make the font "bolder".







{\bBold} text

Bold text



{\iItalic} text

Italic text






X{\u2} + Y{\u2}






{\_underlined} text

underlined text






{\c0000FFRed} Text

Red Text




Dot accent


Flow = {\.V}

Double dot accent


y = y{\d0} + {\.y}t - {\:y}t{\u2}/2



{\w1N} Danger {\w1N}

Wingdings 2


{\w2R} Passed

Wingdings 3


Arrows {\w3!"#$} and\nmore arrows {\w3NOPQ}


Double click on the legend.


To move the legend, point to the legend and drag to the desired location. To edit an existing legend, you can use this command again, double-click on the legend to bring up this dialog box, or right-click on the legend to change settings.


Related macro commands







Page url: