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 SED Pages
Dataplot Vol 1 Vol 2

TAB HORIZONTAL POSITION

Name:
    TAB HORIONTAL POSITION (SET)
    TAB VERTICAL POSITION (SET)
    TAB COLOR (SET)
    TAB JUSTIFICATION (SET)
    TAB FONT (SET)
    TAB UNITS (SET)
    TAB VERTICAL UNITS (SET)
    TAB SIZE (SET)
    TAB WIDTH (SET)
Type:
    Set Subcommand
Purpose:
    For text written on a plot (TEXT, LEGEND, TITLE, LABEL commands), support the use of tabs denoted by the TAB() character sequence.
Description:
    In some cases, plots may be annotated with a descriptive table. We may want to have columns in this table where the different columns may have different attributes.

    In addition to the horizontal position, you can set the vertial position, the color, the justification, the font, the units (i.e., screen units or units of the most recent plot, and the size.

    Tabs must be identified by the character sequence TAB(). Hard coded tab characters are converted to a single space on Dataplot command lines before Dataplot parses the command. Up to 10 tab settings can be specified.

Syntax 1:
    SET TAB HORIZONTAL POSITION <index> <xcoor>
    where <index> is a number or parameter in the range 1 to 10;
    and     <xcoor> is number or parameter that defines the x-coordinate for the text following the tab identified by <index>.
Syntax 2:
    SET TAB VERTICAL POSITION <index> <ycoor>
    where <index> is a number or parameter in the range 1 to 10;
    and     <ycoor> is number or parameter that defines the y-coordinate for the text following the tab identified by <index>.
Syntax 3:
    SET TAB COLOR <index> <color>
    where <index> is a number or parameter in the range 1 to 10;
    and     <color> is literal value that defines the color for the text following the tab identified by <index>.

    If the color is defined by a string, then do something like the following

      LET STRING S = BLUE SET TAB COLOR 1 ^S
Syntax 4:
    SET TAB JUSTIFICATION <index> <just>
    where <index> is a number or parameter in the range 1 to 10;
    and     <just> is literal value that defines the justification for the text following the tab identified by <index>.

    If the justification is defined by a string, then do something like the following

      LET STRING S = CENTER SET TAB JUSTIFICATION 1 ^S
Syntax 5:
    SET TAB FONT <index> <font>
    where <index> is a number or parameter in the range 1 to 10;
    and     <font> is literal value that defines the font for the text following the tab identified by <index>.

    If the font is defined by a string, then do something like the following

      LET STRING S = COMPLEX SET TAB FONT 1 ^S
Syntax 6:
    SET TAB UNITS <index> <DATA/SCREEN>
    where <index> is a number or parameter in the range 1 to 10;
    and     <DATA/SCREEN> is literal value that specifies whether the the horizontal position for the text following the tab identified by <index> is specified in 0 to 100 screen units (SCREEN) or in units of the most recent plot (DATA).

    If the units are defined by a string, then do something like the following

      LET STRING S = DATA SET TAB FONT 1 ^S
Syntax 7:
    SET TAB VERTICAL UNITS <index> <DATA/SCREEN>
    where <index> is a number or parameter in the range 1 to 10;
    and     <DATA/SCREEN> is literal value that specifies whether the the vertical position for the text following the tab identified by <index> is specified in 0 to 100 screen units (SCREEN) or in units of the most recent plot (DATA).

    If the units are defined by a string, then do something like the following

      LET STRING S = DATA SET TAB VERTICAL FONT 1 ^S
Syntax 8:
    SET TAB SIZE <index> <value>
    where <index> is a number or parameter in the range 1 to 10;
    and     <xcoor> is number or parameter that defines the character size, in 0 to 100 screen units, for the text following the tab identified by <index>.
Syntax 9:
    SET TAB WIDTH <index> <value>
    where <index> is a number or parameter in the range 1 to 10;
    and     <xcoor> is number or parameter that defines the character width, in 0 to 100 screen units, for the text following the tab identified by <index>.

    This syntax only applies if a software font is being used.

Examples:
    SET TAB HORIZONTAL POSITION 1 25
    SET TAB COLOR 1 BLUE
    SET TAB SIZE 1 2.5
    SET TAB JUSTIFICATION 1 RIGHT
    SET TAB HORIZONTAL POSITION 2 35
    SET TAB COLOR 2 RED
    SET TAB SIZE 2 3
    SET TAB JUSTIFICATION 2 LEFT
Default:
    None
Synonyms:
    None
Related Commands:
    TEXT = Write a text string immediately.
    TITLE = Specify the title for a plot.
    LEGEND = Specify text to be generated on subsequent plots.
    LABEL = Specify an x- or y-axis label for a plot.
Applications:
    Annotating Plots
Implementation Date:
    2019/03
Program:
     
    . Step 1:   Read the data and generate a fit
    .
    skip 25
    read berger1.dat y x batch
    skip 0
    .
    fit y x
    let a0 = round(a0,2)
    let a1 = round(a1,2)
    let cc = corr y x
    let cc = round(cc,2)
    .
    . Step 2:   Generate the plot
    .
    title offset 2
    title case asis
    label case asis
    legend case asis
    character case asis
    case asis
    .
    title Fit for Alaska Pipeline Data (File: BERGER1.DAT)
    x1label Lab Defect Size
    y1label Field Defect Size
    .
    line blank
    character X
    .
    plot y x
    .
    . Step 3:   Annotate the plot
    .
    set tab horizontal position 1 25
    set tab horizontal position 2 35
    set tab justification 1 right
    set tab justification 2 left
    set tab size  1 3
    .
    justification left
    move 17 85
    text a0:tab()^a0 tab()Intercept
    .
    move 17 82
    text a1:tab()^a1 tab()Slope
    .
    set carriage return gap 0.2
    set tab color 1 red
    set tab color 2 blue
    move 17 79
    text Corr:tab()^cc tab()Linearcr()Correlation
        

Privacy Policy/Security Notice
Disclaimer | FOIA

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

Date created: 03/19/2019
Last updated: 03/19/2019

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