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

CHARACTERS

Name:
    CHARACTERS
Type:
    Plot Control Command
Purpose:
    Specifies character types (A, B, ..., Z, 1, 2, 3, ..., circle, square, triangle, diamond, star, etc.) to appear at the plot points of each trace on subsequent plots.
Syntax 1:
    CHARACTERS <type 1> <type 2> <type 3> etc.
    where <type> specifies the desired character symbol. Up to 100 character symbols can be listed.

    Enter HELP CHARACTER TYPES for a list of available plot symbols.

Syntax 2:
    CHARACTER SAVE

    This syntax saves the current settings of the CHARACTER command.

Syntax 3:
    CHARACTER RESTORE

    This syntax restores the settings of the CHARACTER command saved by a prior CHARACTER SAVE command.

Examples:
    CHARACTERS X BLANK STAR
    CHARACTERS A B C D E
    CHARACTERS STAR CIRCLE SQUARE DIAMOND
    CHARACTERS STAR ALL
    CHARACTERS ALL STAR
    CHARACTERS
Note:
    Characters are specified by trace. All characters belonging to the same trace are plotted with the same plot symbol.
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:
    There are approximately 10 commands for controlling the attributes of the plotted character. See the RELATED COMMANDS section below.
Note:
    User's sometimes wish to draw a plot symbol at every N points on a trace. This is handled in DATAPLOT through the creation of a tag variable. For example, to plot every fifth point do something like the following:

      LET NINC = 5
      LET N = SIZE Y
      LET TAG = SEQUENCE 1 1 N
      LET TAG = MOD(TAG,NINC)
      LET TAG = -1 SUBSET TAG <> 1
      LINE BLANK SOLID
      CHARACTER CIRCLE BLANK
      PLOT Y X SUBSET TAG = 1 AND
      PLOT Y X

    More complex patterns are also possible (all values with the same value for the tag variable are plotted with the same character attributes).

Note:
    The CHARACTER <SAVE/RESTORE> was motivated for use by the Tcl/Tk graphical interface. However, it can also be used directly by the user. A typical use would be to save the current settings before a command, such as the box plot, that requires special settings for the CHARACTER command. The settings could then be easily restored after the special plot.

    This feature was implemented 1998/5.

Note:
    The CHARACTERS command with no arguments sets the character type to blank for all traces. The CHARACTERS command with the word ALL before or after the specified type assigns that character type to all traces; thus CHARACTER X ALL or CHARACTER ALL X assigns the character X to all traces.
Note:
    The following special settings for CHARACTER were implemented 2000/1.

      ROWID - uses the row number as the plot character
      ROWLABEL - uses the row label as the plot character
      XVALUE - uses the x-coordinate of the point as the plot character
      YVALUE - uses the y-coordinate of the point as the plot character
      XYVALUE - uses (x-coor,y-coor) as the plot character
      TVALUE - uses the tag value as the plot character (Dataplot assigns a curve-id, the tag, to each point)
      ZVALUE - this is a special form that is specific to certain commands. For a few commands (currently the DEX CONTOUR PLOT and the CROSS TABULATE PLOT, but we expect a few additional plots to support this form in future releases), Dataplot writes a numeric value into an internal array. The value in this array is used as the plot symbol. Using this with unsupported plot types may have unpredictable results (it will depend on what is stored in the internal array). This option is typically set automatically by Dataplot in the background, so currently users should not set this directly.

    The ROWID and ROWLABEL are typically only used for the PLOT command (i.e., not for HISTOGRAM, etc.). This option keeps track of any subsetting (i.e., SUBSET/FOR/EXCEPT clauses on the plot command) when identifying the point. However, the results may be unpredictable for graphics other than the PLOT command.

    The most common use of this command is to identify specific points on the plot (typically with the ROWLABEL option). A typical sequence would be

      CHARACTER X
      PLOT Y X
      PRE-ERASE OFF
      LIMITS FREEZE
      CHARACTER ROWLABEL
      PLOT Y X SUBSET Y > 90
Note:
    The following special forms of the command can be used to set the character settings for specific graph types

      CHARACTER BOX PLOT
      CHARACTER TUFTE BOX PLOT
      CHARACTER VIOLIN PLOT
      CHARACTER I PLOT
      CHARACTER CONTROL CHART
      CHARACTER ERROR BAR PLOT
Note:
    Dataplot currently allows for 100 settings of the CHARACTER command. There are situations where more than 100 traces are used on a plot. For example, with the syntax

      PLOT Y X X

    the number of traces for the plot will equal the number of unique values for X.

    When the number of traces exceeds 100, Dataplot will repeat the character settings. That is, trace 101 will use setting 1, trace 102 will use setting 2, and so on.

    There may be cases where you want to reserve the first few settings and start the repeat for later settings. You can use the command

      SET CHARACTER REPEAT OFFSET <value>

    to specify an offset for the repeat. For example, if you enter

      SET CHARACTER REPEAT OFFSET 2

    then trace 101 will use character setting 3, traces 102 will use character setting 4, and so on.

    An example of this would be

      CHARACTER X ALL
      CHARACTER BLANK
      LINE BLANK ALL
      LINE SOLID
      .
      SET CHARACTER REPEAT OFFSET 1
      PLOT Y2 X2 AND
      PLOT Y X X

    Here character setting 1 is reserved for the plot of Y2 versus X2 and the character settings for PLOT Y X X will all be set to X.

Default:
    All characters are blank.
Synonyms:
    None
Related Commands: Applications:
    Presentation Graphics
Implementation Date:
    Pre-1987
    1988/11: CHARACTER ERROR BAR PLOT
    1998/02: CHARACTER
    2000/01: CHARACTER ROWID, CHARACTER ROWLABEL
    2000/01: CHARACTER XVALUE, CHARACTER YVALUE, CHARACTER XYVALUE
    2000/01: CHARACTER TVALUE, CHARACTER ZVALUE
    2003/02: CHARACTER VIOLIN PLOT
    2010/06: Allow 16 characters for CHARACTER settings
Program:
     
    . POLLUTION SOURCE ANALYSIS, LLOYD CURRIE, DATE--1990
    . SUBSET OF CURRIE.DAT REFERENCE FILE
    .
    LET ID2 = DATA 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2
    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 X1 X2 Y1 Y2
    LINE BLANK ALL
    LEGEND 1 X - POTASSIUM
    LEGEND 2 Y - LEAD
    .
    TITLE DEMONSTRATE CHARACTER COMMAND
    LET X = SEQUENCE 1 1 17
    PLOT POT X ID2 AND
    PLOT LEAD X ID2
        
    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.