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

CHARACTER AUTOMATIC

Name:
    CHARACTER AUTOMATIC
Type:
    Plot Control Command
Purpose:
    Specifies a variable that is to be used as the arguments to the CHARACTER command.
Description:
    This command allows a variable to be used as the arguments to the CHARACTERS command. It is typically used with the CHARACTER OFFSET or CHARACTER ANGLE command to label plot points. One application is labeling bar charts with the data value. However, it can be used in other ways.

    This command is restricted to numeric values (it does not allow you to specify alphabetic strings). Also, the CHARACTER command is limited to 4 characters, which means that only the first 4 significant digits of the numeric values are printed (it is most typically used with integer values).

    The limit for the number of characters in the CHARACTER command was increased from 4 to 16 in the June, 2010 version of Dataplot.

Syntax 1:
    CHARACTER AUTOMATIC <variable> <SUBSET/EXCEPT/FOR qualification>
    where the first element of <variable> specifies the character for trace 1, the second element specifies the character for trace 2, and so on up to 100 traces;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Syntax 2:
    CHARACTER AUTOMATIC DISTINCT <variable> <SUBSET/EXCEPT/FOR qualification>
    where the first distinct element of <variable> specifies the character for trace 1, the second distinct element specifies the character for trace 2, and so on up to 100 traces;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    The distinction with this syntax is that only the distinct elements of are used.

Syntax 3:
    CHARACTER AUTOMATIC SIGN <variable> <SUBSET/EXCEPT/FOR qualification>
    where the first element of <variable> specifies the character for trace 1, the second element specifies the character for trace 2, and so on up to 100 traces;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    The distinction with this syntax is that the sign of the elements of <variable> are determined. Positive values of <variable> result in a character of "+", negative values of <variable> result in a character of "-", and zero values of <variable> result in a character of "0".

    This syntax was implemented 2001/1.

Examples:
    CHARACTER AUTOMATIC X1
    CHARACTER AUTOMATIC DISTINCT Y1
    CHARACTER AUTOMATIC SIGN Y1
Note:
    The BAR, SPIKE, CHARACTER, and LINE switch all work independently of each other. That is, a plot point can be a line, a character, a spike or a bar or any combination of the above.
Note:
    Although the CHARACTER command can be used to label plot points, be aware that it has some serious limitations in this regard. The most important limitation is that character labels are limited to 4 characters. If you need more than 4 characters, you have to use the TEXT or LEGEND command. However, this is more difficult since the coordinates are given in Dataplot 0 to 100 screen units rather than the data units. The MOVEDATA command can be used with the TEXT command (MOVEDATA is an alternate version of MOVE that uses the coordinates from the most recent plot).

    The number of characters allowed was increased from 4 to 16 in the June, 2010 version of Dataplot.

Note:
    The CHARACTER AUTOMATIC command with no arguments sets all characters to X.
Note:
    In some cases, you may not want to start with the first CHARACTER setting. To specify an offset for the CHARACTER AUTOMATIC command, enter the command

      SET CHARACTER AUTOMATIC OFFSET <value>

    where <value> is a non-negative integer (the default is 0).

    For example,

      CHARACTER AUTOMATIC Y
      SET CHARACTER AUTOMATIC OFFSET 3

    means that Y(1) will be used for the fourth setting of the CHARACTER command, Y(2) will be used for the fifth setting of the character command, and so on.

    This can be useful if your plot needs to reserve the first few character settings for other plot elements.

Note:
    By default, when you enter the CHARACTER AUTOMATIC command, the character settings are extracted immediately from the specified variable. However, there may be situations where you want to defer the extraction until the plot is generated. To specify that the character settings will be extracted when the plot is generated, enter the command

      SET CHARACTER AUTOMATIC DYNAMIC ON

    To reset the default that the character settings will be extracted when the CHARACTER AUTOMATIC command is entered, use the command

      SET CHARACTER AUTOMATIC DYNAMIC OFF
Default:
    No automatic plot characters are used.
Synonyms:
    None
Related Commands: Applications:
    Presentation Graphics
Implementation Date:
    Pre-1987
    2010/06: Support for 16 characters in CHARACTER settings
    2011/12: SET CHARACTER AUTOMATIC OFFSET added
    2012/07: SET CHARACTER AUTOMATIC DYNAMIC added
Program:
    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
    CHARACTER OFFSET  0 4 ALL
    CHARACTER AUTOMATIC Y
    YMAX 600
    XMAX 12
    TITLE DEMONSTRATE CHARACTER AUTOMATIC
    PLOT Y X X
        
    plot generated by sample program

Privacy Policy/Security Notice
Disclaimer | FOIA

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

Date created: 05/09/2016
Last updated: 05/09/2016

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