Creating a Bar Chart That Displays Percentages - SAS Programming

If you want the height (VBAR) or the length (HBAR) of the bars to represent the frequency in percent of the total observations rather than actual counts, you employ the TYPE=PERCENT option on either the VBAR or HBAR statement. To create a vertical bar chart of REGION using percents, code:

Example

PROC CHART DATA=SALES;
TITLE 'Vertical Bar Chart Showing Percents';
VBAR REGION / TYPE=PERCENT;
RON?

Output from Example - Creating a Bar Chart That Displays Percentages

Output from Example - Creating a Bar Chart That Displays Percentages

Here the vertical scale represents percentages of occurrences and is appropriately scaled and labeled.


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

SAS Programming Topics