Representing Two Variables on One Axis - SAS Programming

OK, now for some really neat charts. You can represent two nested categories on the X axis. Suppose you want separate frequency distributions of items for each region of the country using the SALES data set. Use the GROUP= option to accomplish this as follows:

Example

PROC CHART DATA=SALES;
TITLE 'Vertical Bar Chart with GROUP= Option';
VBAR ITEM / GROUP=REGION;
RUN;

The resulting chart is:

Output from Example - Representing Two Variables on One Axis

Output from Example - Representing Two Variables on One Axis

What you get is a series of bar charts showing the frequency of ITEM codes for each of the regions. For example, in the east,there were two purchase orders for hammers, one for pliers, and two for saws.(If this company is not going to go out of business, they're going to have to retool!)


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

SAS Programming Topics