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.
Bar Types
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:
- Standard bar charts (a bar is drawn from the data point to the
X axis.
- Grouped bar charts (bars are drawn for 2 or more groups of data).
- Stacked (or divided) bar charts (the bar is divided into several
intervals).
All of these formats are possibe in Dataplot.
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 ...
For single-trace plots, as from
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 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 interioir are set independently. The following example
shows a few of these attributes.
The Dataplot commands that generated this plot were:
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