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

GROUP LABEL

Name:
    GROUP LABEL (LET)
Type:
    Subcommand under LET
Purpose:
    Converts previously read character data, literal text strings, or previously defined strings to group labels.
Description:
    Dataplot can now read character data using the

      SET CONVERT CHARACTER ON

    command. This command stores the character fields in the file "dpchzf.dat".

    The two primary uses of character data are:

    1. Provide a row identifier for the data.

    2. Define a group (or factor) variable. For example, we can identify sex by coding males as M and females as F.

    In the context of Dataplot, we can use groups in two contexts.

    1. The group variable can be used in a numerical context. For example,

        BOX PLOT Y X

      Here, X is the group-id variable.

      The command CHARACTER CODE (or ALPHABETIC CHARACTER CODE) can be used to create a coded numeric variable from a character variable saved in the file dpchzf.dat.

    2. We may want to use the group label for labeling. In this case, we typically want to use the character coding.

      The GROUP LABEL command is used to create character group labels from a character variable saved in the file dpchzf.dat.

      The GROUP LABEL will extract and save the unique rows for the specified character variable.

      As of version 1/2004, Dataplot can use the group labels for the tic mark labels on a plot. Enter

        HELP TIC MARK LABEL FORMAT
        HELP TIC MARK LABEL CONTENT

      for details. We anticipate additional uses of group labels in subsequent releases of Dataplot.

Syntax 1:
    LET <ig> = GROUP LABEL <ix>
    where <ix> specifies the name of the character variable in the file dpzchf.dat;
    and    <ig> specifies the name for the group label variable.

    The character variable is originally created with a READ command where the SET CONVERT CHARACTER ON was entered prior to the READ.

Syntax 2:
    LET <ig> = GROUP LABEL <str1> .... <strk>
    where <str1> ... <strk> denote k literal text strings.

    This syntax can be used to define a group label variable by entering explicit text strings. Each string is separated by one or more spaces. If the text string contains a space, enter the space as SP() since in this context, quotes are not used to delineate the strings (a quote will simply be considered part of the text string).

Syntax 3:
    LET <ig> = GROUP LABEL <str1> .... <strk>
    where <str1> ... <strk> denote k previously defined strings.

    This syntax can be used to define a group label variable based on previously defined strings. Note that this syntax supports the TO clause. That is,

      LET IG = GROUP LABEL S1 TO S5

    will create the group label variable from the previously defined strings S1, S2, S3, S4, and S5.

    Note that if any of the names listed are not previously defined strings, then all of the names will be interpreted as literal text (i.e., Syntax 2).

Examples:
    SET CONVERT CHARACTER ON
    READ TEST.DAT Y X IX
    LET IG = GROUP LABEL IX

    LET IG = GROUP LABEL CASESP()1 CASESP()2 CASESP()3

    LET STRING S1 = Case 1
    LET STRING S2 = Case 2
    LET STRING S3 = Case 3
    LET STRING S4 = Case 4
    LET STRING S5 = Case 5
    LET IG = GROUP LABEL S1 TO S5

Note:
    Dataplot allows a maximum of five group label variables. You may reuse a group label variable by using the name of a previously entered group label.

    The maximum number of levels for a given group is MAXOBV/100 with MAXOBV denoting the maximum number of observations for a variable (this is typically set to either 100,000 or 20,000).

Note:
    The SORT BY <statistic> command can be used to generate sorted plots. This command returns an index variable that can be used to conveniently sort the tick mark labels created using the GROUP LABEL command. Enter HELP SORT BY for details.
Default:
    None
Synonyms:
    None
Related Commands: Applications:
    Input/Output, Presentation Graphics
Implementation Date:
    2004/1
    2006/1: Added Syntax 2 and Syntax 3 versions of the command
Program:
     
    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

Privacy Policy/Security Notice
Disclaimer | FOIA

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

Date created: 02/03/2004
Last updated: 11/03/2015

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