|
Manual page for Gallery_-_Bars_(vertical)(PL)
This page contains a series of vertical bar graph examples
illustrating the available varieties and options.
These examples all use ploticus's proc bars,
which renders bar graphs, error bars, and bar segments, in vertical or horizontal
orientation. Clickmaps are supported
for bar graphs.
Example 1 - vbars prefab
vbars prefab
The vbars prefab
is the easiest way to create basic bar graphs without writing any script code.
Example 2 - stack prefab
stack prefab
The stack prefab creates stacked bar graphs of up to 4 levels.
Example 3 - chron prefab
chron prefab
The chron prefab can create bar graphs for time series data.
Example 4 - dist prefab
dist prefab
The dist prefab takes a stream of numeric or
alphanumeric data, computes a frequency distribution, and plots it.
Example 5 - script
stock2
A stock price/volume display. The bars show low-high range
for the day (segmentfields attribute), and have left tics to
show opening price, and right tics to show closing price.
Example 6 - script
mouse.p2
Histogram automatically generated from random data, fitted with a bspline curve.
Example 7 - script
bars2
In this example, values less than zero result in red downward bars.
The positive bars are done first using orange and then the negative bars
are done using red.
The values are displayed near the ends of the bars using the
showvalues option.
Example 8 - script
bars9
Another example of values less than zero.
Example 9 - script
hitcount
A histogram example, which utilizes datetime scaling as well as
some of ploticus's data filtering / processing features.
Example 10 - script
bars3
Stacked bars. These show magnitude of several components as well
as the sum of the components.
proc bars
is executed four times, first to render bars for Steve, then for Lisa,
then for Rob, then for Takisha.
The stackfield attribute indicates what data field(s) should be used
to raise the bars. For a full-page version of this see
vermonth.
Note: stacking cannot be used when components are a mixture of
positive and negative values.
Example 11 - script
teens
Clustered bars.
These allow components to be compared with each other, as well
as across multiple instances, without regard to the sum of the
components (if the sum of
the components is of primary interest, a stacked layout probably
should be used).
proc bars
is executed two times, first to render the pink bars,
and then again to do the blue.
The cluster attribute indicates the bars' position with clusters;
for the red bars it is 1 / 3, for the blue it is 2 / 3,
and for the orange it is 3 / 3.
Example 12 - script
students
This example allows a variable number of datafields, and the number
of bars per cluster (as well as the legend) follows the number of datafields on input.
Example 13 - script
bars5a
Stacked, clustered bars.
These may be useful in displaying multiple variables, groupings, and instances.
proc bars
is executed once for each color of bar, using
the stackfield and cluster attributes to control position.
bars5 is another example of stack clustered bars.
Example 14 - script
propbars2
Here, the bar segments represent proportions of a whole.
The stackfields attribute is used to position bars.
See also propbars1, a horizontal example
of proportional bars.
Examples of bar labeling
bars6
Here, bar labels
are formatted using the labelword attribute
to show dollar amounts.
bars7
Longwise labels, formatted to show dollar amounts.
bars8
Individual components of a stacked bar graph
labeled with values. Label position is adjusted downward
so that label is within bar, and a lighter-colored backing box is
used so that the labels are visible.
|
 data display engine
Copyright Steve Grubb
|