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: Bars

Introduction Dataplot can draw a curve as a character or plot symbol at each point, as a connected line, as a spike from the point to a base, as a bar from the point to a base, or as any combination of the above (including drawing none or all of them). The choice is determined by the LINE, CHARACTER, SPIKE, and BAR commands. The switches for these commands work independently of each other.
Description The BAR switch is most commonly used to generate bar charts. It is also used to plot histograms (although Dataplot handles this automatically). The following types of bar charts are commonly used in business and presentation graphics:
  1. Standard bar charts (a bar is drawn from the data point to the X axis.
  2. Grouped bar charts (bars are drawn for two or more groups of data).
  3. Stacked (or divided) bar charts (the bar is divided into several intervals).
All of these formats are possibe in Dataplot.
Use of Short Forms The short designations (e.g., BL for BLANK, SO for SOLID, DA3 for DASH3) allow for the specification of a large number of bar types on a single command line, as in

    BAR SO SO SO SO SO DO DO DO DO DO ...
      DA DA DA DA DA
How Dataplot Decides Which Bar Pattern to Use For single-trace plots, as from
    PLOT Y X
Dataplot makes use of the first bar type specified.

For multi-trace plots, as from

    PLOT Y1 Y2 Y3 Y4 Y5 VS X
    PLOT Y X TAG
Dataplot makes use of the respective bar types for each trace; thus the first bar type defines the type for the first trace, the second bar type defines the type for the second trace, and so forth. Multi-trace plots are the mechanism for generating group and stacked bar plots in Dataplot.
Dataplot Program Demonstrating the Attributes of Lines Dataplot allows you to set various attributes for both the bar border (color, line style, thickness) and the bar interior (solid fill, hatch fill pattern, color, various others). The attributes for the border and the interior are set independently. The following example shows a few of these attributes.
    LET Y = DATA 392 341 307 203 115 59 38 32 29 28
    .
    TITLE BAR PLOT
    XLIMITS 1 10
    XTIC OFFSET 1 1
    LET N = SIZE Y
    BAR ON
    LINE BLANK
    .
    MULTIPLOT 2 2
    MULTIPLOT CORNER COORDINATES 0 0 100 100
    PLOT Y
    .
    BAR FILL ON
    BAR WIDTH 0.5
    PLOT Y
    .
    BAR FILL COLOR BLUE
    BAR BORDER COLOR BLUE
    PLOT Y
    .
    BAR BORDER COLOR BLACK
    BAR PATTERN D1D2
    BAR PATTERN SPACING 3
    PLOT Y
    END OF MULTIPLOT
Dataplot Graph The above Dataplot program generated the following graph.

Plot demonstrating various bar attributes.

Privacy Policy/Security Notice
Disclaimer | FOIA

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

Date created: 6/5/2001
Last updated: 10/30/2013

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