HISTOGRAM Subcommand (IGRAPH command)
HISTOGRAM
creates a histogram element in a chart, corresponding to the X1, X2, and Y axis assignments. Horizontal
or vertical orientation is specified by the COORDINATE
subcommand. A histogram groups the values
of a variable into evenly spaced groups (intervals or bins) and plots
a count of the number of cases in each group. The count can be expressed
as a percentage. Percentages are useful for comparing datasets of
different sizes. The count or percentage can also be accumulated across
the groups.
-
$COUNT
or$PCT
must be specified on theY
subcommand.
The following keywords are available:
SHAPE. Defines the
shape of the histogram. Currently, the only value for SHAPE
is HISTOGRAM
.
CUM. Specifies a cumulative histogram. Counts or percentages are aggregated across the values of the domain variables.
X1INTERVAL. Intervals
on the X1 axis can be set automatically,
or you can specify the number of intervals (1 to 250) along the axis (NUM
) or the width of an interval (WIDTH
).
X2INTERVAL. Intervals
on the X2 axis can be set automatically,
or you can specify the number of intervals (1 to 250) along the axis (NUM
) or the width of an interval (WIDTH
).
CURVE. Superimposes a normal curve on a 2-D histogram. The normal curve has the same mean and variance as the data.
X1START. The starting point along the X1 axis. Indicates the percentage of an interval width above the minimum value along the X1 axis at which to begin the histogram. The value can range from 0 to 99.
X2START. The starting point along the X2 axis. Indicates the percentage of an interval width above the minimum value along the X2 axis at which to begin the histogram. The value can range from 0 to 99.
Example
IGRAPH
/X1=VAR(sales96) TYPE=SCALE
/Y=$count
/Histogram SHAPE=HISTOGRAM CURVE=ON X1INTERVAL WIDTH=100.
-
Histogram
creates a histogram of sales96. The sales96 intervals are 100 units wide. -
CURVE
superimposes a normal curve on the histogram.