BARCHART subcommand (FREQUENCIES command)

BARCHART produces a bar chart for each variable named on the VARIABLES subcommand. By default, the horizontal axis for each bar chart is scaled in frequencies, and the interval width is determined by the largest frequency count for the variable being plotted. Bar charts are labeled with value labels or with the value itself if no label is defined.

Note: Charts are not produced in the output when bootstrapping is enabled for the FREQUENCIES command.
  • The minimum specification is the BARCHART keyword, which generates default bar charts.
  • BARCHART cannot be used with HISTOGRAM.

MIN(n). Lower bound below which values are not plotted.

MAX(n). Upper bound above which values are not plotted.

FREQ(n). Vertical axis scaled in frequencies, where optional n is the maximum. If n is not specified or if it is too small, FREQUENCIES chooses 5, 10, 20, 50, 100, 200, 500, 1000, 2000, and so forth, depending on the largest category. This is the default.

PERCENT(n) . Vertical axis scaled in percentages, where optional n is the maximum. If n is not specified or if it is too small, FREQUENCIES chooses 5, 10, 25, 50, or 100, depending on the frequency count for the largest category.

Producing a Basic Bar Chart

FREQUENCIES VARIABLES = RACE /BARCHART.
  • FREQUENCIES produces a frequency table and the default bar chart for variable RACE.

Producing a Custom Bar Chart

FREQUENCIES VARIABLES = V1 V2 /BAR=MAX(10).
  • FREQUENCIES produces a frequency table and bar chart with values through 10 for each of variables V1 and V2.