Creating a Vertical Bar Chart - SAS Programming

The simplest type of chart you can produce is a frequency bar chart. In this type of chart, the bars represent the number of the observations that have the values that are displayed on the X axis.If you simply want to display the number of observations in the data set SALES for each region of the country, you write:


TITLE 'Vertical Bar Chart';

The VBAR (vertical bar) statement specifies the variable for which you want frequency counts.In this case REGION is a character variable which has the values NORTH, SOUTH, EAST,and WEST.The resulting chart follows. Note that LINESIZE= and PAGESIZE= settings will effect the heights and widths of the bars and scales.

Output from Example - Creating a Vertical Bar Chart

Output from Example - Creating a Vertical Bar Chart

The bars in the chart represent the frequency of observations for the regions listed on the X axis.PROC CHART uses the asterisk (*) character to build the bars by default.You can specify a different character with the SYMBOL= option. Also, you use the SUBGROUP= option which adds intelligence to the bar-building characters.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

SAS Programming Topics