Ploticus data display engine Copyright Steve Grubb
Ploticus Gallery - Bars (vertical)
This page contains a series of vertical bar graph examples
illustrating the available varieties and options.
These examples all use ploticus's proc bars
Example 1
bars1
Simple example.
Example 2
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 3
mouse.p2
Histogram automatically generated from random data, fitted with a bspline curve.
Example 4
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 5
bars9
Another example of values less than zero.
Example 6
hitcount
A histogram example, which utilizes datetime scaling as well as
some of ploticus's data filtering / processing features.
Example 7
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 8
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 9
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 10
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 11
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.