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

TIC MARK LABEL FORMAT

Name:
    ...TIC MARK LABEL FORMAT
Type:
    Plot Control Command
Purpose:
    Specifies the format of the labels associated with the major tic marks on subsequent plots.
Description:
    This command has three uses.

    1. For linear scales the following formats are available:

      ALPHA - the tic labels will be user-supplied (via the TIC MARK LABEL CONTENT command) alphanumeric strings.
      REAL - linear scales are drawn with numeric values.
      EXPO - linear scales are drawn in exponential format. The default is E15.7 format. Use the TIC MARK LABEL DECIMAL command to control the number of digits (e.g., TIC MARK LABEL DECIMAL 4 will use an E12.4 format. This option was implemented 1997/07.

    2. Log scales can be drawn in one of 3 formats. The available formats are:

      POWER - the corresponding power of 10 (e.g., 1 for 10**1) is drawn for the tic label.
      REAL - the corresponding real number (e.g., 10 for 10**1) is drawn for the tic label.
      EXPO - the tic label is drawn in exponential format (e.g., 10**1). The tic label must be drawn with a software font in order for this option to work correctly.

    3. You can specify a variable be used to determine the contents of the tic mark labels:

      GROUP LABEL - use a group label variable for the tic mark labels (the variable name is specified on the TIC MARK LABEL CONTENT command).
      ROW LABEL - use the row labels for the tic mark labels (no TIC MARK LABEL CONTENT is needed).
      VARIABLE - use the contents of a numeric variable for the tic mark labels (the variable name is specified on the TIC MARK LABEL CONTENT command).

      The 2019/12 version updated this option to support character variables as well as numeric variables. See Program 5 below for an example.

      Group labels are useful for box plots and other plots that are plotted against a group-id variable. The VARIABLE option can be used to generate a "reverse" axis. The ROW LABEL option is most commonly used for bar charts (and related type plots).

Syntax:
    <prefix>TIC MARK LABEL FORMAT <format>
    where
                no prefix refers to all 4 sides;
                the prefix X refers to both horizontal sides;
                the prefix Y refers to both vertical sides;
                the prefix X1 refers to the lower horizontal side;
                the prefix X2 refers to the upper horizontal side;
                the prefix Y1 refers to the left vertical side;
                the prefix Y2 refers to the right vertical side;
    and <format> is one of ALPHA/REAL/POWER/EXPO/GROUP LABEL as described in the DESCRIPTION section above.
Examples:
    TIC MARK LABEL FORMAT REAL
    TIC MARK LABEL FORMAT POWER
    TIC MARK LABEL FORMAT
    X2TIC MARK LABEL FORMAT ALPHA
    Y2TIC MARK LABEL FORMAT EXPONENTIAL
    X1TIC MARK LABEL CONTENT EXPONENTIAL
Note:
    A ...TIC MARK LABEL FORMAT command with no arguments reverts the setting to default; thus X1TIC MARK LABEL FORMAT with no arguments reverts the bottom horizontal tic label to the default format. A ...TIC MARK LABEL FORMAT command with no prefix refers to all 4 sides; thus TIC MARK LABEL FORMAT REAL sets tic mark labels to real for all 4 frame lines. TIC MARK LABEL FORMAT with no prefix and no arguments reverts the tic label format settings on all 4 sides to default.
Default:
    The tic mark labels for Linear scales are real numbers. The tic mark labels for log scales are drawn with the POWER format.
Synonyms:
    TIC LABEL FORMAT is a synonym for TIC MARK LABEL FORMAT, as in TIC LABEL FORMAT REAL and X2TIC LABEL FORMAT REAL.
Related Commands: Applications:
    Log scales, presentation graphics.
Implementation Date:
    1988/02
    2004/01: Added support for group labels, row labels and numeric variables to specify the contents of tic mark labels.
    2019/12: Added support for character variables to specify the contents of tic mark labels.
Program 1:
     
    LEGEND 1 PRESENTATION GRAPHICS
    LEGEND 2 3-D BAR HISTOGRAM
    LET Y = DATA 392 341 307 203 115 59 38 32 29 28
    LET N = NUMBER Y
    LET X = SEQUENCE 1 1 N
    .
    LINES BLANK ALL
    BAR ON ALL
    BAR WIDTH .5 ALL
    BAR DIMENSION 3 ALL
    BAR FILL ONTS ALL
    .
    XLIMITS 1 10
    XTIC OFFSET 1 1
    MAJOR XTIC MARK NUMBER 10
    MINOR XTIC MARK NUMBER 0
    X1TIC MARK LABEL FORMAT ALPHA
    X1TIC MARK LABEL CONTENT Apollo Sun HP DEC SYM SGI IBM DG TI Xerox
    X1TIC MARK LABEL CASE ASIS
    YLIMITS 0 500
    .
    TITLE DEMONSTRATE TIC LABEL FORMAT
    PLOT Y X X
        
    plot generated by sample program
Program 2:
     
    SERIAL READ Y
       60.   2042.  2111.   1684.  3888.  1858.  11379.  17560.  39287.
     4382.  113159.  175108.  273291.  400186.  581243.  811568.
     1121004.  1506550.  2002767.  2611612.  3369180.
    END OF DATA
    SERIAL READ X
         0.  1.  32.  243.  1024.  3125.  7776.  16807.  32768.  59049.
    100000.  161051.  248832.  371293.  537824.  759375.  1048576.
    1419857.  1889568.  2476099.  3200000.
    END OF DATA
    .
    TITLE SIZE 3
    TIC LABEL SIZE 2.5
    MULTIPLOT 2 2; MULTIPLOT CORNER COORDINATES 0 0 100 100
    TITLE LINEAR SCALE
    PLOT Y X
    TITLE LOG SCALES (POWER FORMAT)
    LOG ON
    LET X = 0.0001 SUBSET X <= 0
    PLOT Y X
    TITLE LOG SCALE (REAL FORMAT)
    TIC LABEL FORMAT REAL
    PLOT Y X
    TITLE LOG SCALE (EXPONENTIAL FORMAT)
    TIC LABEL FORMAT EXPONENTIAL
    TIC LABEL FONT SIMPLEX
    PLOT Y X
    END OF MULTIPLOT
        
    plot generated by sample program
Program 3:
     
    set convert character on
    skip 25
    read draft69c.dat rank day month
    .
    let ig = group label month
    x1tic mark label format group label
    x1tic mark label content ig
    x1tic mark label font simplex
    x1tic mark label angle 45
    x1tic mark label displacement 10
    let xcode = character code month
    .
    major xtic mark number 12
    minor xtic mark number 0
    xlimits 1 12
    xtic offset 0.5 0.5
    .
    char box plot
    line box plot
    fences on
    .
    box plot rank xcode
        
    plot generated by sample program
Program 4:
     
    . Purpose:  Test TIC MARK LABEL FORMAT VARIABLE command for
    .           bihistogram
    .
    SKIP 25
    READ AUTO83B.DAT Y1 Y2
    DELETE Y2 SUBSET Y2 < 0
    .
    TITLE AUTOMATIC
    TITLE OFFSET 2
    LABEL CASE ASIS
    Y1LABEL MPG for US Cars
    X1LABEL MPG for Japanese Cars
    .
    LET YLAB = DATA 30 20 10 0 10 20 30 40 50 60
    Y1TIC MARK LABEL FORMAT VARIABLE
    Y1TIC MARK LABEL CONTENT YLAB
    .
    BIHISTOGRAM Y1 Y2
        
    plot generated by sample program
Program 5:
     
    . Purpose:  Test TIC MARK LABEL FORMAT VARIABLE command for
    .           both numeric and character data
    .
    . Step 1:   Create some data
    .
    let y = data 6  4 9
    set string variable overwrite
    set convert character on
    read rowid ix
    1  Group_1
    2  Group_2
    3  Group_3
    end of data
    .
    set string variable append
    read iy  zz
    Row1    0
    Row5    5
    Row10  10
    end of data
    .
    . Step 2:   Set the plot control
    .
    xlimits 1 3
    major x1tic mark number 3
    minor x1tic mark number 0
    x1tic mark offset 0.8 0.8
    x1tic mark label format variable
    x1tic mark label content ix
    major x2tic mark number 3
    minor x2tic mark number 0
    x2tic marks on
    x2tic mark label on
    x2tic mark offset 0.8 0.8
    x2tic mark label format variable
    x2tic mark label content rowid
    ylimits 0 10
    major y1tic mark number 3
    minor y1tic mark number 4
    y1tic mark label format variable
    y1tic mark label content iy
    major y2tic mark number 3
    minor y2tic mark number 4
    y2tic marks on
    y2tic mark label on
    y2tic mark label format variable
    y2tic mark label content zz
    .
    bar on
    bar width 0.5
    line blank
    .
    . Step 3:   Plot the data
    .
    plot y
        
    plot generated by sample program

Privacy Policy/Security Notice
Disclaimer | FOIA

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

Date created: 01/08/2020
Last updated: 01/08/2020

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