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 2 Vol 1

BULLET PLOT

Name:
    BULLET PLOT
Type:
    Graphics Command
Purpose:
    Generates a bullet plot.
Description:
    A bullet chart is a variant of the bar chart suggested by Stephen Few. The plot consists of

    1. A response variable.
    2. A target variable.
    3. One or more background regions.

    The appearance of the plot is controlled by the settings for the bar and character commands. This is demonstrated in the Program examples below. Specifically,

    1. The first trace is the response value. This is typically drawn as a narrow bar.

    2. The second trace is the target value. This is typically drawn as either a character or a narrow bar.

    3. Traces 3 and higher draw the background regions. This often delineate qualitative regions (e.g., "poor", "good", "excellent"). These are typically drawn as wide bars.
Syntax:
    BULLET PLOT <y> <ytarg> <yback>
                            <SUBSET/EXCEPT/FOR qualification>
    where <y> is the response variable;
                <ytarg> is a variable containing the target value;
                <yback> is a variable that contains the levels for the background bars;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    The <y> and <ytarg> variables must have the same number of observations.

Example:
    BULLET PLOT Y YTARGET YBACK
Default:
    None
Synonyms:
    None
Related Commands:
    BAR = Sets the type for plot bars.
    CHARACTERS = Sets the type for plot characters.
    PLOT = Generates a data or function plot.
    WATERFALL CHART = Generates a waterfall chart.
Reference:
    Few, Stephen (2006), "Information Dashboard Design: The Effective Visual Communication of Data," 2006, ISBN 0-596-10016-7.
Applications:
    Presentation Graphics
Implementation Date:
    2025/06
Program 1:
     
    . Step 1:   Create the data
    .
    skip 25
    read gear.dat y x
    skip 0
    set let cross tabulate collapse
    let ymean = cross tabulate mean y x
    let n = size ymean
    .
    . Step 2:   Plot control
    .
    title case asis
    label case asis
    legend case asis
    .
    horizontal switch on
    ylimits 1 n
    major ytic mark number n
    minor ytic mark number 0
    tic mark offset units data
    y1tic mark offset 0.8 0.8
    y1label Batch
    x1label Mean Diameter
    xlimits 0.98 1.01
    x1tic mark offset 0 0.005
    .
    line blank all
    character blank all
    character blank circle
    character color black red
    character hw 1.0 0.75 all
    character fill off on
    .
    bar on off on on on
    bar fill on off on on on
    bar fill color black black g90 g60 g30
    bar width 0.6 all
    bar width 0.3
    bar base 0.98 0.98 0.98
    .
    let ytarg = 1 for i = 1 1 n
    let yrange = data 0.99 1.0 1.01
    .
    title Bullet Plot (GEAR.DAT)
    bullet plot ymean ytarg yrange
    
        
Program 2:
     
    . Step 1:   Create the data - example from Wikipedia
    .
    let y     = data 270
    let ytarg = data 260
    let yback = data 200 250 300
    .
    . Step 2:   Plot control
    .
    title case asis
    label case asis
    legend case asis
    .
    horizontal switch on
    ylimits 0 2
    y1tic marks off
    y1tic mark labels off
    xlimits 0 300
    major xtic mark number 7
    minor xtic mark number 0
    tic mark offset units data
    x1tic mark offset 0 10
    .
    multiplot corner coordinates 5 5 90 90
    multiplot scale factor 2
    multiplot 2 1
    frame corner coordinates 30 20 95 90
    x2frame off
    yframe off
    .
    line blank all
    character blank all
    .
    bar on on on on on
    bar fill on on on on on
    bar fill color black black red orange green
    bar width 1.0 all
    bar width 0.3 0.8
    let ytarg = ytarg + 2
    bar base 0 258
    .
    legend justification center
    legend 1 coordinates 15 55
    legend 1 Revenue 2024 YTD
    legend 1 size 3
    legend 2 coordinates 15 45
    legend 2 (US$ in Millions)
    legend 2 size 1.5
    .
    bullet plot y ytarg yback
    bar fill color black black g30 g60 g90
    bullet plot y ytarg yback
    .
    end of multiplot
    justification center
    move 50 95
    text Example of Bullet Plot
    
        
Date created: 06/10/2025
Last updated: 06/10/2025

Please email comments on this WWW page to [email protected].