SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Staff SED Projects SED Products and Publications Search Dataplot Pages

Dataplot: Plot Annotation

Commands for Annotating Plot Dataplot provides the commands TITLE, LABEL, LEGEND, and TEXT for annotating plots.

The TTITLE command is used to place a title on plot and the LABEL command is used to specify X and Y axis labels. For example,

    TITLE POLLUTION SOURCE ANALYSIS
    X1LABEL LEAD
    Y1LABEL POTASSIUM
    PLOT POT VS LEAD
Title and Axes Labels Apply to All Subsequent Plots The title and axes labels are applied to all subsequent plots. They are not placed on a currently existing plot (as is done by some software packages). In Dataplot, the TITLE and LABEL commands set internal switches. When a plot is generated, it uses the current settings of these switches. This means that the specified titles and axis labels persist beyond the next plot. To specify different titles and axis labels, simply enter the commands with the new text. To turn off the title or an axis label, enter the command with no argument (i.e., TITLE, X1LABEL, Y1LABEL).
Setting the Attributes of the Title The title allows a single line to be specified. You can set the case (lower, upper, or as entered), color, displacement (the distance from the upper frame line to the title), font, size, and line width (only applies if the title is drawn with a software font). If you want a multiline title, you need to use the LEGEND command.
LABEL Command The LABEL command can be used to put an axis label on the left Y axis, on the right Y axis, and up to 3 lines on the lower X axis. You cannot specify an axis label for the upper X axis label. The LABEL command uses a prefix to identify the desire axis label. Y1LABEL refers to the left Y axis, Y2LABEL applies to the right Y axis, YLABEL refers to both the left and right Y axes, X1LABEL refers to the first line of the lower X axis, X2LABEL to the second line, X3LABEL to the third line, XLABEL to all 3 lines, and LABEL to all 5 axes labels.
Setting the Attributes of Labels Similar to the title, you can set the case (lower, upper, or as entered), color, displacement (the distance from the frame line to the label), fill (used to specify that certain special characters such as circles or squares are solid filled), font, size, and line width (only applies if the title is drawn with a software font).
LEGEND Command The TITLE and LABEL command place text at specific locations on the plot. It is often necessary to place text at an arbitrary position on the plot. Both the LEGEND and TEXT commands allow you to do this. The distinction is that LEGEND places the specified text on all subsequent plots (until it is changed or turned off) while the TEXT command is used to place the specified text immediately. Text drawn with the TEXT command does not persist to subsequent plots.
Positioning Legends Up to 100 legends can be specified on a plot. The positions of the legends are specified in 0 to 100 units in both the horizontal and vertical directions. That is, the lower left corner of the output page is (0,0) and the upper right corner is (100,100). For reference, the default position of the lower left of the plot frame is (15,20) and the default position of the upper right of the plot frame is (85,90).
Setting the Legend Attributes You can set the angle (only applies if the legend is drawn with a software font), case (lower, upper, or as entered), color, direction (horizontal or vertical), fill (used to specify that certain special characters such as circles or squares are solid filled), font, justificiation (both horizontal and vertical justification can be specified), height and width, size, and line width (only applies if the title is drawn with a software font).
TEXT Command The TEXT command draws the specified text at the current position. This is typically set with a MOVE or MOVEDATA command. The distinction is that MOVE specifies the position in terms of the 0 to 100 units while MOVEDATA specifies the position in units of the most recent plot. When multiple lines of text are being drawn, the commands CR, CRLF, LF, MARGIN, and VERTICAL SPACING can be used to specify certain types of automatic spacing.
Setting the Attributes of the TEXT Command You can set the angle, case (upper, lower, or as entered), color, fill (used to specify that certain special characters such as circles or squares are solid filled), font, character height, horizontal spacing, character height and width, fixed or proportional spacing, line width (only applies if a software font is used), or character width.
Example Demonstrating Title, Axes Labels, and Legends on a Plot The following Dataplot program demonstrates the placing of titles, axes labels, and legends on a plot.
      SERIAL READ LEAD
      164 426 59 98 312 263 607 497 213 54 160 262 547 325 419 94 70
      END OF DATA
      SERIAL READ POT
      106 175 61 79 94 121 424 328 107 218 140 179 246 231 245 339 99
      END OF DATA
      .
      CHARACTER CIRCLE
      CHARACTER FILL ON
      LINE BLANK ALL
      .
      TITLE POLLUTION SOURCE ANALYSIS
      X1LABEL LEAD
      Y1LABEL POTASSIUM
      LEGEND SIZE 1.5
      LEGEND CASE ASIS
      LEGEND 1 COORDINATES 5 8
      LEGEND 1 Source: Lloyd Currie
      LEGEND 2 COORDINATES 5 5
      LEGEND 2 Date: 1990
      .
      PLOT POT VS LEAD
      
Dataplot Graph The above Dataplot program generated the following graph.

Plot demonstrating the placing of titles, axes labels, and legends

Example Demonstrating the Use of the TEXT Command to Generate a Word Chart The following Dataplot program demonstrates the use of the TEXT command to generate a word chart.
      VERTICAL SPACING 6
      CRLF ON
      MARGIN 10
      FONT DUPLEX
      .
      HW 4 2
      MOVE 5 95
      TEXT JAPAN's 6-POINT PROGRAM FOR
      MOVE 5 89
      TEXT QUALITY MANUFACTURING
      MOVE 10 80
      HW 2.4 1.2
      TEXT CIRC() QUALITY AUDITS
      TEXT CIRC() COMPANY-WIDE QUALITY CONTROL (CWQC)
      TEXT CIRC() QUALITY TRAINING AND EDUCATION
      TEXT CIRC() APPLICATION OF STATISTICAL METHODS
      TEXT CIRC() QUALITY CIRCLE ACTIVITIES
      TEXT CIRC() NATION-WIDE QUALITY CONTROL PROMOTIONAL ACTIVITIES
      HW 2 1
      MOVE 5 10
      TEXT SOURCE: Q.C. TRENDS WINTER 1985, PAGES 22-23.
      
Dataplot Graph The above Dataplot program generated the following graph.

Plot demonstrating use of TEXT command in Dataplot

Privacy Policy/Security Notice
Disclaimer | FOIA

NIST is an agency of the U.S. Commerce Department.

Date created: 06/05/2001
Last updated: 09/20/2016

Please email comments on this WWW page to alan.heckert@nist.gov.