BAR Subcommand (GRAPH command)
BAR creates
one of five types of bar charts using the keywords SIMPLE, COMPOSITIONAL, GROUPED, STACKED, or RANGE.
- Only one keyword can be specified, and it must be specified in parentheses.
- When no keyword is specified, the default is either
SIMPLEorGROUPED, depending on the type of function/variable specification.
SIMPLE. Simple bar
chart. This is the default if no keyword is specified
on the BAR subcommand and the
variables define a simple bar chart. A simple bar chart can be defined
by a single summary or count function and a single BY variable or by multiple summary functions
and no BY variable.
GROUPED. Clustered
bar chart. A clustered bar chart is defined by a single
function and two BY variables
or by multiple functions and a single BY variable. This is the default if no keyword is specified on the
BAR subcommand and the variables
define a clustered bar chart.
STACKED. Stacked bar
chart. A stacked bar chart displays a series of bars,
each divided into segments stacked one on top of the other. The height
of each segment represents the value of the category. Like a clustered
bar chart, it is defined by a single function and two BY variables or by multiple functions and
a single BY variable.
RANGE. Range bar
chart. A range bar chart displays a series of floating
bars. The height of each bar represents the range of the category
and its position in the chart indicates the minimum and maximum values.
A range bar chart can be defined by a single function and two BY variables or by multiple functions and
a single BY variable. If a variable
list is used as the argument for a function, the list must be of an
even number. If a second BY variable
is used to define the range, the variable must be dichotomous.