BIN Subcommand (XGRAPH command)

For population pyramids, the BIN subcommand controls the starting point and size of the bins. The bins are the bars in the chart and represent a group of data values. For example, if there are four bins in a chart and the values range from 0-100, the bin width is 25. Therefore, all points with values of 0-24 would be in the first bin, those with values of 25-49 would be in the second bin, and so on. Each keyword is followed by an equals sign (=) and the value for that keyword.

Example

XGRAPH CHART=([HISTOBAR]) BY age[s] BY gender[c]
  /COORDINATE SPLIT=YES
  /BIN START=30 SIZE=WIDTH(5).
  • The first bin begins at age 30.
  • Each bin includes cases with age values that span 5 years.
  • So the first bin contains the cases with ages 30-34, the second bin contains the cases with ages 35-39, and so on.